yosys/tests/asicworld/code_verilog_tutorial_alway...

12 lines
175 B
Verilog

module always_example();
reg clk,reset,enable,q_in,data;
always @ (posedge clk)
if (reset) begin
data <= 0;
end else if (enable) begin
data <= q_in;
end
endmodule