f4pga-examples/eos-s3/btn_counter/btn_counter.v

15 lines
195 B
Verilog
Raw Normal View History

module top(
input wire clk,
output wire [3:0] led
);
reg [3:0] cnt;
initial cnt <= 0;
always @(posedge clk)
cnt <= cnt + 1;
assign led = cnt;
endmodule