2015-01-01 12:42:39 -06:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2021-12-09 17:22:37 -06:00
|
|
|
../../yosys -qq -f verilog -p "proc; opt; memory -nomap -bram temp/brams_${2}.txt; opt -fast -full" \
|
2015-01-01 12:42:39 -06:00
|
|
|
-l temp/synth_${1}_${2}.log -o temp/synth_${1}_${2}.v temp/brams_${1}.v
|
2016-10-11 05:12:32 -05:00
|
|
|
iverilog -Dvcd_file=\"temp/tb_${1}_${2}.vcd\" -DSIMLIB_MEMDELAY=1 -o temp/tb_${1}_${2}.tb temp/brams_${1}_tb.v \
|
2015-01-03 03:57:01 -06:00
|
|
|
temp/brams_${1}_ref.v temp/synth_${1}_${2}.v temp/brams_${2}.v ../../techlibs/common/simlib.v
|
2015-01-01 12:42:39 -06:00
|
|
|
temp/tb_${1}_${2}.tb > temp/tb_${1}_${2}.txt
|
2015-01-02 06:59:47 -06:00
|
|
|
if grep -q ERROR temp/tb_${1}_${2}.txt; then
|
|
|
|
grep -HC2 ERROR temp/tb_${1}_${2}.txt | head
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-01-01 12:42:39 -06:00
|
|
|
exit 0
|