diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-03-19 13:11:30 -0700 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2019-03-19 13:11:30 -0700 |
commit | 24553326dde876b51179e092e608ce8174a44681 (patch) | |
tree | 29af5ce1fabcef3a105f45898b411ec4188bf97f /tests/tools/autotest.sh | |
parent | 0ea7eba5f13b20de28181a66181ee821820027db (diff) | |
parent | 8c0740bcf7a1149ac11332f7e7fd9c8f78f0a0b5 (diff) | |
download | yosys-24553326dde876b51179e092e608ce8174a44681.tar.gz yosys-24553326dde876b51179e092e608ce8174a44681.tar.bz2 yosys-24553326dde876b51179e092e608ce8174a44681.zip |
Merge remote-tracking branch 'origin/master' into xc7srl
Diffstat (limited to 'tests/tools/autotest.sh')
-rwxr-xr-x | tests/tools/autotest.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh index 84e62e011..f3dac504e 100755 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@ -108,8 +108,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 @@ -132,8 +133,12 @@ do bn=$(basename $bn) rm -f ${bn}_ref.fir - - egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.v + 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 if [ ! -f ../${bn}_tb.v ]; then "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.v @@ -141,7 +146,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 |