diff options
Diffstat (limited to 'examples/icestick/uart/syn')
-rwxr-xr-x | examples/icestick/uart/syn/constraints/uart.pcf | 6 | ||||
-rwxr-xr-x | examples/icestick/uart/syn/synth.sh | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/examples/icestick/uart/syn/constraints/uart.pcf b/examples/icestick/uart/syn/constraints/uart.pcf new file mode 100755 index 0000000..e3e5016 --- /dev/null +++ b/examples/icestick/uart/syn/constraints/uart.pcf @@ -0,0 +1,6 @@ +# FTDI Port B UART +set_io osl_data_n 8 # UART TX +set_io isl_data_n 9 # UART RX + +# 12 MHz clock +set_io isl_clk 21 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 |