diff options
Diffstat (limited to 'tests/tools/autotest.sh')
-rwxr-xr-x | tests/tools/autotest.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh index 6fdd1e80a..2722cba19 100755 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@ -110,8 +110,9 @@ shift $((OPTIND - 1)) for fn do - bn=${fn%.v} - if [ "$bn" == "$fn" ]; then + bn=${fn%.*} + ext=${fn##*.} + if [[ "$ext" != "v" ]] && [[ "$ext" != "aag" ]] && [[ "$ext" != "aig" ]]; then echo "Invalid argument: $fn" >&2 exit 1 fi @@ -133,9 +134,18 @@ do fn=$(basename $fn) bn=$(basename $bn) +<<<<<<< HEAD + if [[ "$ext" == "v" ]]; then + egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.${ext} + else + "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "verilog" -o ${bn}_ref.v ../${fn} + frontend="verilog" + fi +======= rm -f ${bn}_ref.fir egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.v +>>>>>>> e45f62b0c56717a23099425f078d1e56212aa632 if [ ! -f ../${bn}_tb.v ]; then "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.v @@ -143,7 +153,8 @@ do cp ../${bn}_tb.v ${bn}_tb.v fi if $genvcd; then sed -i 's,// \$dump,$dump,g' ${bn}_tb.v; fi - compile_and_run ${bn}_tb_ref ${bn}_out_ref ${bn}_tb.v ${bn}_ref.v $libs + compile_and_run ${bn}_tb_ref ${bn}_out_ref ${bn}_tb.v ${bn}_ref.v $libs \ + "$toolsdir"/../../techlibs/common/simlib.v if $genvcd; then mv testbench.vcd ${bn}_ref.vcd; fi test_count=0 |