diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-01-05 17:02:01 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-01-05 17:02:01 +0100 |
commit | f589ce86bac3169281a077248af328f6758ff0eb (patch) | |
tree | 838e2616a8fe72f17df3e328e13eab51064539bf | |
parent | 17ceab92a93f5d2ef0eb26f3fd04df65e4393f9f (diff) | |
download | yosys-f589ce86bac3169281a077248af328f6758ff0eb.tar.gz yosys-f589ce86bac3169281a077248af328f6758ff0eb.tar.bz2 yosys-f589ce86bac3169281a077248af328f6758ff0eb.zip |
Add skeleton Yosys-Libero igloo2 example project
Signed-off-by: Clifford Wolf <clifford@clifford.at>
-rw-r--r-- | examples/igloo2/.gitignore | 2 | ||||
-rw-r--r-- | examples/igloo2/example.v | 22 | ||||
-rw-r--r-- | examples/igloo2/example.ys | 2 | ||||
-rw-r--r-- | examples/igloo2/libero.sh | 4 | ||||
-rw-r--r-- | examples/igloo2/libero.tcl | 14 |
5 files changed, 44 insertions, 0 deletions
diff --git a/examples/igloo2/.gitignore b/examples/igloo2/.gitignore new file mode 100644 index 000000000..ae86e69cc --- /dev/null +++ b/examples/igloo2/.gitignore @@ -0,0 +1,2 @@ +/example.edn +/work 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 diff --git a/examples/igloo2/example.ys b/examples/igloo2/example.ys new file mode 100644 index 000000000..75a305d86 --- /dev/null +++ b/examples/igloo2/example.ys @@ -0,0 +1,2 @@ +read_verilog example.v +synth_sf2 -top top -edif example.edn diff --git a/examples/igloo2/libero.sh b/examples/igloo2/libero.sh new file mode 100644 index 000000000..582f6ccb9 --- /dev/null +++ b/examples/igloo2/libero.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -ex +rm -rf work +LM_LICENSE_FILE=1702@`hostname` /opt/microsemi/Libero_SoC_v11.9/Libero/bin/libero SCRIPT:libero.tcl diff --git a/examples/igloo2/libero.tcl b/examples/igloo2/libero.tcl new file mode 100644 index 000000000..cc1ab2403 --- /dev/null +++ b/examples/igloo2/libero.tcl @@ -0,0 +1,14 @@ +# Run with "libero SCRIPT:libero.tcl" + +new_project \ + -name top \ + -location work \ + -family IGLOO2 \ + -die PA4MGL500 \ + -package tq144 \ + -speed -1 \ + -hdl VERILOG + +import_files -edif {example.edn} +run_tool –name {COMPILE} +run_tool –name {PLACEROUTEN} |