aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tools
diff options
context:
space:
mode:
authorJim Lawson <ucbjrl@berkeley.edu>2019-04-01 11:09:12 -0700
committerJim Lawson <ucbjrl@berkeley.edu>2019-04-01 11:09:12 -0700
commitb8dfda876795dbf08bec49ab06ac8603025d2114 (patch)
tree35cd5485c70c17e93426d54a104018bae90ed924 /tests/tools
parent6d2ea6fe5563205c0f565810d615c4900d4508d8 (diff)
parent22035c20ff071ec5c30990258850ecf97de5d5b3 (diff)
downloadyosys-b8dfda876795dbf08bec49ab06ac8603025d2114.tar.gz
yosys-b8dfda876795dbf08bec49ab06ac8603025d2114.tar.bz2
yosys-b8dfda876795dbf08bec49ab06ac8603025d2114.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tests/tools')
-rwxr-xr-xtests/tools/autotest.sh16
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