Verilog RS Latch

Quick example accomplishing an RS Latch with Verilog Data Flow.

module rs_latch( q, qn, s, r );
 
        input s, r;
        output q, qn;
 
        assign qn = ~( s & q );
        assign q  = ~( r & qn );
 
endmodule

Leave a Reply