aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bram/run-single.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bram/run-single.sh')
-rw-r--r--tests/bram/run-single.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/bram/run-single.sh b/tests/bram/run-single.sh
new file mode 100644
index 000000000..abaae0e2e
--- /dev/null
+++ b/tests/bram/run-single.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+../../yosys -qq -p "proc; opt; memory -nomap; memory_bram -rules temp/brams_${2}.txt; opt -fast -full" \
+ -l temp/synth_${1}_${2}.log -o temp/synth_${1}_${2}.v temp/brams_${1}.v
+iverilog -o temp/tb_${1}_${2}.tb temp/brams_${1}_tb.v temp/brams_${1}_ref.v \
+ temp/synth_${1}_${2}.v temp/brams_${2}.v ../../techlibs/common/simlib.v
+temp/tb_${1}_${2}.tb > temp/tb_${1}_${2}.txt
+if grep -H -C1 ERROR temp/tb_${1}_${2}.txt; then exit 1; fi
+exit 0