f4pga-examples/qlf_k4n8/btn_counter/btn_counter.v

14 lines
180 B
Verilog

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