aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/ice40/tests/test_dsp_model.sh
diff options
context:
space:
mode:
Diffstat (limited to 'techlibs/ice40/tests/test_dsp_model.sh')
-rw-r--r--techlibs/ice40/tests/test_dsp_model.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/techlibs/ice40/tests/test_dsp_model.sh b/techlibs/ice40/tests/test_dsp_model.sh
new file mode 100644
index 000000000..ad079b2b6
--- /dev/null
+++ b/techlibs/ice40/tests/test_dsp_model.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+set -ex
+sed 's/SB_MAC16/SB_MAC16_UUT/; /SB_MAC16_UUT/,/endmodule/ p; d;' < ../cells_sim.v > test_dsp_model_uut.v
+cat /opt/lscc/iCEcube2.2017.01/verilog/sb_ice_syn.v > test_dsp_model_ref.v
+iverilog -s testbench -o test_dsp_model test_dsp_model.v test_dsp_model_uut.v test_dsp_model_ref.v
+./test_dsp_model