1
0
forked from tanchou/Verilog
Files
Verilog_Louis/Introduction/counter/counter.v
Gamenight77 7bd92ebe98 counter
2025-03-22 09:50:52 +01:00

16 lines
244 B
Verilog

module counter (
input wire clk,
input wire rst,
output reg [3:0] count
);
always @(posedge clk)
begin
if(rst)
count <= 4'b0000;
else
count <= count + 1;
end
);
endmodule