diff options
Diffstat (limited to 'machxo2/examples/blinky.v')
-rw-r--r-- | machxo2/examples/blinky.v | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/machxo2/examples/blinky.v b/machxo2/examples/blinky.v new file mode 100644 index 00000000..42becb72 --- /dev/null +++ b/machxo2/examples/blinky.v @@ -0,0 +1,12 @@ +module top(input clk, rst, output reg [7:0] leds); + +reg [7:0] ctr; +always @(posedge clk) + if (rst) + ctr <= 8'h00; + else + ctr <= ctr + 1'b1; + +assign leds = ctr; + +endmodule |