diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2019-03-19 09:41:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 09:41:40 -0700 |
commit | a7ac8393d47303aa3f2bbd103dfde1ec32e12941 (patch) | |
tree | af43bf9735fe47b09dbd8807c63fe451eb82aaba /tests/tools/autotest.sh | |
parent | 61f37706f93042c2d1f093dd9bfa717390911eb3 (diff) | |
parent | 02e8dc7ad2e13a43a310d311302c6db8168e6c11 (diff) | |
download | yosys-a7ac8393d47303aa3f2bbd103dfde1ec32e12941.tar.gz yosys-a7ac8393d47303aa3f2bbd103dfde1ec32e12941.tar.bz2 yosys-a7ac8393d47303aa3f2bbd103dfde1ec32e12941.zip |
Merge pull request #808 from eddiehung/read_aiger
Add new read_aiger frontend
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 |