yosys/tests/asicworld/code_verilog_tutorial_flip_...

16 lines
205 B
Verilog
Raw Normal View History

2013-01-05 04:13:26 -06:00
module flif_flop (clk,reset, q, d);
input clk, reset, d;
output q;
reg q;
always @ (posedge clk )
begin
if (reset == 1) begin
q <= 0;
end else begin
q <= d;
end
end
endmodule