aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tools
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-11-24 15:10:43 +0100
committerClifford Wolf <clifford@clifford.at>2013-11-24 15:10:43 +0100
commit1e6836933d8b74d391f816ccdcf71c972f8b1db1 (patch)
tree60bf4a29c1def59c85854229439a535c58db5c98 /tests/tools
parent72b35e0b99381df7bda7fdd2811e67ae5cfad80a (diff)
downloadyosys-1e6836933d8b74d391f816ccdcf71c972f8b1db1.tar.gz
yosys-1e6836933d8b74d391f816ccdcf71c972f8b1db1.tar.bz2
yosys-1e6836933d8b74d391f816ccdcf71c972f8b1db1.zip
Added modelsim support to autotest
Diffstat (limited to 'tests/tools')
-rwxr-xr-xtests/tools/autotest.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh
index 992c8563e..3d7601ebe 100755
--- a/tests/tools/autotest.sh
+++ b/tests/tools/autotest.sh
@@ -3,6 +3,7 @@
libs=""
genvcd=false
use_isim=false
+use_modelsim=false
verbose=false
keeprunning=false
backend_opts="-noattr -noexpr"
@@ -14,10 +15,12 @@ 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 il:wkvrxs: opt; do
+while getopts iml:wkvrxs: opt; do
case "$opt" in
i)
use_isim=true ;;
+ m)
+ use_modelsim=true ;;
l)
libs="$libs $(cd $(dirname $OPTARG); pwd)/$(basename $OPTARG)";;
w)
@@ -69,7 +72,12 @@ create_ref() {
compile_and_run() {
exe="$1"; output="$2"; shift 2
- if $use_isim; then
+ if $use_modelsim; then
+ altver=$( ls -v /opt/altera/ | grep '^[0-9]' | tail -n1; )
+ /opt/altera/$altver/modelsim_ase/bin/vlib work
+ /opt/altera/$altver/modelsim_ase/bin/vlog "$@"
+ /opt/altera/$altver/modelsim_ase/bin/vsim -c -do 'run -all; exit;' testbench | grep '#OUT#' > "$output"
+ elif $use_isim; then
(
set +x
files=( "$@" )