module test(clk,run,q); input clk; input run; output [3:0] q; reg [3:0] q; always @(posedge clk) begin if (!run) q <= 4'b0001; else q <= q + 4'b0001; end endmodule