aboutsummaryrefslogtreecommitdiffstats
path: root/icebram/rundemo.sh
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2016-05-11 13:37:52 +0200
committerClifford Wolf <clifford@clifford.at>2016-05-11 13:37:52 +0200
commit66e35e36dcebd3d0e68fea0b3148a50d7f966a63 (patch)
tree78c6bfe43374d42761f3e25c2faaa1b153e08d37 /icebram/rundemo.sh
parentaf36a8ade3f69d7b5513bd5593559416c8a2d833 (diff)
downloadicestorm-66e35e36dcebd3d0e68fea0b3148a50d7f966a63.tar.gz
icestorm-66e35e36dcebd3d0e68fea0b3148a50d7f966a63.tar.bz2
icestorm-66e35e36dcebd3d0e68fea0b3148a50d7f966a63.zip
Added icebram test bench
Diffstat (limited to 'icebram/rundemo.sh')
-rw-r--r--icebram/rundemo.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/icebram/rundemo.sh b/icebram/rundemo.sh
new file mode 100644
index 0000000..9358447
--- /dev/null
+++ b/icebram/rundemo.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+set -ex
+
+python3 makedemo.py
+yosys -p 'synth_ice40 -blif demo.blif' demo.v
+arachne-pnr -d 8k -w demo.pcf -o demo.asc demo.blif
+
+if true; then
+ cp demo.asc demo_new.asc
+ cp demo_dat0.hex demo_dat1.hex
+else
+ ./icebram -o demo_new.asc demo.asc demo_dat0.hex demo_dat1.hex
+fi
+
+icebox_vlog -n demo -p demo.pcf -c demo_new.asc > demo_new.v
+iverilog -o demo.vvp demo_tb.v demo_new.v $( yosys-config --datdir/ice40/cells_sim.v )
+vvp -N demo.vvp