yosys/tests/sim/dffsr.v

10 lines
183 B
Verilog
Raw Permalink Normal View History

2022-02-15 02:35:53 -06:00
module dffsr( input clk, d, clr, set, output reg q );
always @( posedge clk, posedge set, posedge clr)
if ( clr )
q <= 0;
else if (set)
q <= 1;
else
q <= d;
endmodule