diff options
Diffstat (limited to 'machxo2/examples/simple.sh')
-rw-r--r-- | machxo2/examples/simple.sh | 20 |
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" |