这个可以有,另外送一个同步低电平复位端
module counter( input rst_n, input clk, output reg [3:0] dout ); always @ (posedge clk) begin if(!rst_n) dout<=4'd0; else dout<=dout+4'd1; end endmodule
这个可以有,另外送一个同步低电平复位端
module counter( input rst_n, input clk, output reg [3:0] dout ); always @ (posedge clk) begin if(!rst_n) dout<=4'd0; else dout<=dout+4'd1; end endmodule