Files

13 lines
167 B
Verilog
Raw Permalink Normal View History

2019-06-20 13:44:21 +02:00
module top (
input clk,
output reg [7:0] cnt
);
initial cnt = 0;
always @(posedge clk) begin
if (cnt < 20)
cnt <= cnt + 1;
else
cnt <= 0;
end
endmodule