forked from tanchou/Verilog
15 lines
241 B
Coq
15 lines
241 B
Coq
![]() |
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
|