From f589ce86bac3169281a077248af328f6758ff0eb Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 5 Jan 2019 17:02:01 +0100 Subject: Add skeleton Yosys-Libero igloo2 example project Signed-off-by: Clifford Wolf --- examples/igloo2/example.v | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 examples/igloo2/example.v (limited to 'examples/igloo2/example.v') diff --git a/examples/igloo2/example.v b/examples/igloo2/example.v new file mode 100644 index 000000000..3eb7007c5 --- /dev/null +++ b/examples/igloo2/example.v @@ -0,0 +1,22 @@ +module top ( + input clk, + output LED1, + output LED2, + output LED3, + output LED4, + output LED5 +); + + localparam BITS = 5; + localparam LOG2DELAY = 22; + + reg [BITS+LOG2DELAY-1:0] counter = 0; + reg [BITS-1:0] outcnt; + + always @(posedge clk) begin + counter <= counter + 1; + outcnt <= counter >> LOG2DELAY; + end + + assign {LED1, LED2, LED3, LED4, LED5} = outcnt ^ (outcnt >> 1); +endmodule -- cgit v1.2.3