yosys/tests/asicworld/code_verilog_tutorial_flip_...

16 lines
191 B
Verilog
Raw Permalink Normal View History

2013-01-05 11:13:26 +01:00
module flif_flop (clk,reset, q, d);
input clk, reset, d;
output q;
reg q;
2026-06-23 07:24:59 +02:00
2013-01-05 11:13:26 +01:00
always @ (posedge clk )
begin
if (reset == 1) begin
q <= 0;
end else begin
q <= d;
end
end
2026-06-23 07:24:59 +02:00
2013-01-05 11:13:26 +01:00
endmodule