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/simple.sh | |
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/simple.sh')
-rw-r--r-- | machxo2/examples/simple.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/machxo2/examples/simple.sh b/machxo2/examples/simple.sh new file mode 100644 index 00000000..1da60933 --- /dev/null +++ b/machxo2/examples/simple.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +if [ $# -lt 2 ]; then + echo "Usage: $0 prefix mode" + exit -1 +fi + +case $2 in + "pack") + NEXTPNR_MODE="--pack-only" + ;; + "place") + NEXTPNR_MODE="--no-route" + ;; + "pnr") + NEXTPNR_MODE="" + ;; + *) + echo "Mode string must be \"pack\", \"place\", or \"pnr\"" + exit -2 + ;; +esac + +set -ex + +${YOSYS:-yosys} -p "read_verilog ${1}.v + synth_machxo2 -json ${1}.json + show -format png -prefix ${1}" +${NEXTPNR:-../../nextpnr-machxo2} $NEXTPNR_MODE --1200 --package QFN32 --no-iobs --json ${1}.json --write ${2}${1}.json +${YOSYS:-yosys} -p "read_verilog -lib +/machxo2/cells_sim.v + read_json ${2}${1}.json + clean -purge + show -format png -prefix ${2}${1} + write_verilog -noattr -norename ${2}${1}.v" |