aboutsummaryrefslogtreecommitdiffstats
path: root/machxo2/examples/simple.sh
diff options
context:
space:
mode:
authorWilliam D. Jones <thor0505@comcast.net>2021-02-08 16:55:26 -0500
committergatecat <gatecat@ds0.me>2021-02-12 10:36:59 +0000
commit730e543ca65e97f1518fd0a9e692b233e15dcdbd (patch)
treed26c3f73b96669364b25293065be4b6453d24bee /machxo2/examples/simple.sh
parent0b0faa2f1c1e0cf148a6cee37041320def12678c (diff)
downloadnextpnr-730e543ca65e97f1518fd0a9e692b233e15dcdbd.tar.gz
nextpnr-730e543ca65e97f1518fd0a9e692b233e15dcdbd.tar.bz2
nextpnr-730e543ca65e97f1518fd0a9e692b233e15dcdbd.zip
machxo2: Add prefix parameter to simple.sh. Update README.md.
Diffstat (limited to 'machxo2/examples/simple.sh')
-rw-r--r--machxo2/examples/simple.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/machxo2/examples/simple.sh b/machxo2/examples/simple.sh
index c977bf1a..1da60933 100644
--- a/machxo2/examples/simple.sh
+++ b/machxo2/examples/simple.sh
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
-if [ $# -lt 1 ]; then
- echo "Usage: $0 mode"
+if [ $# -lt 2 ]; then
+ echo "Usage: $0 prefix mode"
exit -1
fi
-case $1 in
+case $2 in
"pack")
NEXTPNR_MODE="--pack-only"
;;
@@ -23,12 +23,12 @@ esac
set -ex
-${YOSYS:-yosys} -p "read_verilog blinky.v
- synth_machxo2 -json blinky.json
- show -format png -prefix blinky"
-${NEXTPNR:-../../nextpnr-machxo2} $NEXTPNR_MODE --1200 --package QFN32 --no-iobs --json blinky.json --write ${1}blinky.json
+${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 ${1}blinky.json
+ read_json ${2}${1}.json
clean -purge
- show -format png -prefix ${1}blinky
- write_verilog -noattr -norename ${1}blinky.v"
+ show -format png -prefix ${2}${1}
+ write_verilog -noattr -norename ${2}${1}.v"