aboutsummaryrefslogtreecommitdiffstats
path: root/examples/icestick/uart/syn/synth.sh
diff options
context:
space:
mode:
Diffstat (limited to 'examples/icestick/uart/syn/synth.sh')
-rwxr-xr-xexamples/icestick/uart/syn/synth.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/icestick/uart/syn/synth.sh b/examples/icestick/uart/syn/synth.sh
new file mode 100755
index 0000000..884f1b6
--- /dev/null
+++ b/examples/icestick/uart/syn/synth.sh
@@ -0,0 +1,15 @@
+set -e
+
+ROOT="$(pwd)/.."
+
+rm -rf build
+mkdir -p build
+cd build
+
+ghdl -a "$ROOT"/hdl/uart_rx.vhd
+ghdl -a "$ROOT"/hdl/uart_tx.vhd
+ghdl -a "$ROOT"/hdl/uart_top.vhd
+yosys -m ghdl -p 'ghdl uart_top; synth_ice40 -json uart_top.json'
+nextpnr-ice40 --hx1k --json uart_top.json --pcf ../constraints/uart.pcf --asc uart_top.asc --pcf-allow-unconstrained
+icepack uart_top.asc uart_top.bin
+iceprog uart_top.bin