From d0b822c0365c52a8a8439094f2268cfa0c461b5e Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Sun, 31 Jan 2021 22:42:15 -0500 Subject: machxo2: Add demo.sh TinyFPGA Ax example. --- machxo2/examples/tinyfpga.v | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 machxo2/examples/tinyfpga.v (limited to 'machxo2/examples/tinyfpga.v') diff --git a/machxo2/examples/tinyfpga.v b/machxo2/examples/tinyfpga.v new file mode 100644 index 00000000..dfc2710d --- /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 TinyFPGA_A2 ( + (* 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 -- cgit v1.2.3 From a3a38b0536a59be8f2fd7afd1914989d0ed23da7 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Mon, 8 Feb 2021 01:37:14 -0500 Subject: machxo2: Add prefix parameter to mitertest.sh. All Verilog files top modules named "top". --- machxo2/examples/tinyfpga.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'machxo2/examples/tinyfpga.v') diff --git a/machxo2/examples/tinyfpga.v b/machxo2/examples/tinyfpga.v index dfc2710d..bd26d8eb 100644 --- a/machxo2/examples/tinyfpga.v +++ b/machxo2/examples/tinyfpga.v @@ -2,7 +2,7 @@ // https://github.com/tinyfpga/TinyFPGA-A-Series/tree/master/template_a2 // https://tinyfpga.com/a-series-guide.html used as a basis. -module TinyFPGA_A2 ( +module top ( (* LOC="13" *) inout pin1 ); -- cgit v1.2.3