summaryrefslogtreecommitdiff
path: root/tests/tools
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-01 03:55:51 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-01 03:55:51 +0200
commit03ef9a75c64f79596d6c931a1401184c33f9346b (patch)
treee7024d4386e2ad7edb4d471e17518653a4b8b63a /tests/tools
parent32a1cc3efdad7953af1805b245f2a0292698633a (diff)
Added "test_autotb -n <num_iter>" option
Diffstat (limited to 'tests/tools')
-rwxr-xr-xtests/tools/autotest.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh
index 781dc167..2d97e46f 100755
--- a/tests/tools/autotest.sh
+++ b/tests/tools/autotest.sh
@@ -9,6 +9,7 @@ keeprunning=false
makejmode=false
frontend="verilog"
backend_opts="-noattr -noexpr"
+autotb_opts=""
scriptfiles=""
scriptopt=""
toolsdir="$(cd $(dirname $0); pwd)"
@@ -18,7 +19,7 @@ if [ ! -f $toolsdir/cmp_tbdata -o $toolsdir/cmp_tbdata.c -nt $toolsdir/cmp_tbdat
( set -ex; gcc -Wall -o $toolsdir/cmp_tbdata $toolsdir/cmp_tbdata.c; ) || exit 1
fi
-while getopts xmGl:wkjvrf:s:p: opt; do
+while getopts xmGl:wkjvrf:s:p:n: opt; do
case "$opt" in
x)
use_xsim=true ;;
@@ -45,6 +46,8 @@ while getopts xmGl:wkjvrf:s:p: opt; do
scriptfiles="$scriptfiles $OPTARG" ;;
p)
scriptopt="$OPTARG" ;;
+ n)
+ autotb_opts="$autotb_opts -n $OPTARG" ;;
*)
echo "Usage: $0 [-x|-m] [-w] [-k] [-j] [-v] [-r] [-l libs] [-f frontend] [-s script] [-p cmdstring] verilog-files\n" >&2
exit 1
@@ -102,7 +105,7 @@ do
cd ${bn}.out
cp ../$fn $fn
if [ ! -f ../${bn}_tb.v ]; then
- "$toolsdir"/../../yosys -b test_autotb -o ${bn}_tb.v $fn
+ "$toolsdir"/../../yosys -b "test_autotb $autotb_opts" -o ${bn}_tb.v $fn
else
cp ../${bn}_tb.v ${bn}_tb.v
fi