yosys/tests/asicworld/code_tidbits_reg_seq_example.v

16 lines
217 B
Verilog
Raw Normal View History

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