From d0b822c0365c52a8a8439094f2268cfa0c461b5e Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Sun, 31 Jan 2021 22:42:15 -0500 Subject: machxo2: Add demo.sh TinyFPGA Ax example. --- machxo2/examples/demo.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 machxo2/examples/demo.sh (limited to 'machxo2/examples/demo.sh') diff --git a/machxo2/examples/demo.sh b/machxo2/examples/demo.sh new file mode 100644 index 00000000..6979f111 --- /dev/null +++ b/machxo2/examples/demo.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if [ ! -z ${TRELLIS_DB+x} ]; then + DB_ARG="--db $TRELLIS_DB" +fi + +${YOSYS:-yosys} -p 'synth_machxo2 -json tinyfpga.json' tinyfpga.v +${NEXTPNR:-../../nextpnr-machxo2} --1200 --package QFN32 --no-iobs --json tinyfpga.json --textcfg tinyfpga.txt +ecppack --compress $DB_ARG tinyfpga.txt tinyfpga.bit +tinyproga -b tinyfpga.bit -- cgit v1.2.3 From 0aa472fb3adac0b76ef0b69831d5b83ff1200fe2 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Mon, 8 Feb 2021 00:07:39 -0500 Subject: machxo2: Add prefix paramter to demo.sh. --- machxo2/examples/demo.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'machxo2/examples/demo.sh') diff --git a/machxo2/examples/demo.sh b/machxo2/examples/demo.sh index 6979f111..00cb0cd0 100644 --- a/machxo2/examples/demo.sh +++ b/machxo2/examples/demo.sh @@ -1,10 +1,22 @@ #!/bin/sh +if [ $# -lt 1 ]; then + echo "Usage: $0 prefix" + exit -1 +fi + +if ! grep -q "(\*.*LOC.*\*)" $1.v; then + echo "$1.v does not have LOC constraints for tinyfpga_a." + exit -2 +fi + if [ ! -z ${TRELLIS_DB+x} ]; then DB_ARG="--db $TRELLIS_DB" fi -${YOSYS:-yosys} -p 'synth_machxo2 -json tinyfpga.json' tinyfpga.v -${NEXTPNR:-../../nextpnr-machxo2} --1200 --package QFN32 --no-iobs --json tinyfpga.json --textcfg tinyfpga.txt -ecppack --compress $DB_ARG tinyfpga.txt tinyfpga.bit -tinyproga -b tinyfpga.bit +set -ex + +${YOSYS:-yosys} -p "synth_machxo2 -json $1.json" $1.v +${NEXTPNR:-../../nextpnr-machxo2} --1200 --package QFN32 --no-iobs --json $1.json --textcfg $1.txt +ecppack --compress $DB_ARG $1.txt $1.bit +tinyproga -b $1.bit -- cgit v1.2.3