diff options
author | tux3 <barrdetwix@gmail.com> | 2019-06-05 00:47:54 +0200 |
---|---|---|
committer | tux3 <barrdetwix@gmail.com> | 2019-06-06 18:07:49 +0200 |
commit | 88f59770932720cfc1e987c98e53faedd7388ed8 (patch) | |
tree | 57bdf2f9ede3a9692449e6d83992ecba0535fcda /tests/tools | |
parent | 1332051f331108e73ac468f226034720bd856281 (diff) | |
download | yosys-88f59770932720cfc1e987c98e53faedd7388ed8.tar.gz yosys-88f59770932720cfc1e987c98e53faedd7388ed8.tar.bz2 yosys-88f59770932720cfc1e987c98e53faedd7388ed8.zip |
SystemVerilog support for implicit named port connections
This is the `foo foo(.port1, .port2);` SystemVerilog syntax
introduced in IEEE1800-2005.
Diffstat (limited to 'tests/tools')
-rwxr-xr-x | tests/tools/autotest.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh index 920474a84..0a511f29c 100755 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@ -89,6 +89,13 @@ done compile_and_run() { exe="$1"; output="$2"; shift 2 + ext=${1##*.} + if [ "$ext" == "sv" ]; then + language_gen="-g2012" + else + language_gen="-g2005" + fi + if $use_modelsim; then altver=$( ls -v /opt/altera/ | grep '^[0-9]' | tail -n1; ) /opt/altera/$altver/modelsim_ase/bin/vlib work @@ -99,7 +106,7 @@ compile_and_run() { /opt/Xilinx/Vivado/$xilver/bin/xvlog $xinclude_opts -d outfile=\"$output\" "$@" /opt/Xilinx/Vivado/$xilver/bin/xelab -R work.testbench else - iverilog $include_opts -Doutfile=\"$output\" -s testbench -o "$exe" "$@" + iverilog $language_gen $include_opts -Doutfile=\"$output\" -s testbench -o "$exe" "$@" vvp -n "$exe" fi } @@ -110,7 +117,7 @@ for fn do bn=${fn%.*} ext=${fn##*.} - if [[ "$ext" != "v" ]] && [[ "$ext" != "aag" ]] && [[ "$ext" != "aig" ]]; then + if [[ "$ext" != "v" ]] && [[ "$ext" != "sv" ]] && [[ "$ext" != "aag" ]] && [[ "$ext" != "aig" ]]; then echo "Invalid argument: $fn" >&2 exit 1 fi @@ -123,6 +130,10 @@ do echo -n "Test: $bn " fi + if [ "$ext" == sv ]; then + frontend="$frontend -sv" + fi + rm -f ${bn}.{err,log,skip} mkdir -p ${bn}.out rm -rf ${bn}.out/* |