diff options
author | gatecat <gatecat@ds0.me> | 2021-02-15 09:39:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 09:39:56 +0000 |
commit | 065f46daeb05a8b12cc663a44410b6da27a8d9e3 (patch) | |
tree | ca538791141e442c105c47f836069f95ce2f988d /machxo2/examples/tinyfpga.v | |
parent | 1b6cdce9251d42236a3db0314e84d6a3e3f06408 (diff) | |
parent | 9c9a02628d60dca9c9a566b0fcf3bf3dd2c68076 (diff) | |
download | nextpnr-065f46daeb05a8b12cc663a44410b6da27a8d9e3.tar.gz nextpnr-065f46daeb05a8b12cc663a44410b6da27a8d9e3.tar.bz2 nextpnr-065f46daeb05a8b12cc663a44410b6da27a8d9e3.zip |
Merge pull request #578 from YosysHQ/machxo2-rebase
machxo2, rebased and updated
Diffstat (limited to 'machxo2/examples/tinyfpga.v')
-rw-r--r-- | machxo2/examples/tinyfpga.v | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/machxo2/examples/tinyfpga.v b/machxo2/examples/tinyfpga.v new file mode 100644 index 00000000..bd26d8eb --- /dev/null +++ b/machxo2/examples/tinyfpga.v @@ -0,0 +1,28 @@ +// Modified from: +// https://github.com/tinyfpga/TinyFPGA-A-Series/tree/master/template_a2 +// https://tinyfpga.com/a-series-guide.html used as a basis. + +module top ( + (* LOC="13" *) + inout pin1 +); + + + wire clk; + + OSCH #( + .NOM_FREQ("16.63") + ) internal_oscillator_inst ( + .STDBY(1'b0), + .OSC(clk) + ); + + reg [23:0] led_timer; + + always @(posedge clk) begin + led_timer <= led_timer + 1; + end + + // left side of board + assign pin1 = led_timer[23]; +endmodule |