nextpnr/machxo2/examples/blinky.v

14 lines
226 B
Coq
Raw Normal View History

2020-11-22 07:42:30 +08:00
module top(input clk, rst, output [7:0] leds);
// TODO: Test miter circuit without reset value.
reg [7:0] ctr = 8'h00;
always @(posedge clk)
if (rst)
ctr <= 8'h00;
else
ctr <= ctr + 1'b1;
assign leds = ctr;
endmodule