diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-09-30 06:47:16 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-09-30 06:47:16 +0200 |
commit | c26973e620349e8ceb87b22c89c92ae82b8a75f9 (patch) | |
tree | 80879ac1d449dcb8aa40c022c7d5d038241600b5 | |
parent | 8b49c49096b151556520897566ea2b9532b33243 (diff) | |
download | ghdl-c26973e620349e8ceb87b22c89c92ae82b8a75f9.tar.gz ghdl-c26973e620349e8ceb87b22c89c92ae82b8a75f9.tar.bz2 ghdl-c26973e620349e8ceb87b22c89c92ae82b8a75f9.zip |
testsuite/gna: add a test for #1759
-rw-r--r-- | testsuite/gna/issue1759/repro.vhdl | 18 | ||||
-rwxr-xr-x | testsuite/gna/issue1759/testsuite.sh | 20 |
2 files changed, 38 insertions, 0 deletions
diff --git a/testsuite/gna/issue1759/repro.vhdl b/testsuite/gna/issue1759/repro.vhdl new file mode 100644 index 000000000..a4a932531 --- /dev/null +++ b/testsuite/gna/issue1759/repro.vhdl @@ -0,0 +1,18 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity repro is +end; + +architecture behav of repro is + signal s : std_logic := '0'; +begin + process + begin + for v in std_logic loop + s <= v; + wait for 1 ns; + end loop; + wait; + end process; +end behav; diff --git a/testsuite/gna/issue1759/testsuite.sh b/testsuite/gna/issue1759/testsuite.sh new file mode 100755 index 000000000..bf1a421e0 --- /dev/null +++ b/testsuite/gna/issue1759/testsuite.sh @@ -0,0 +1,20 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze repro.vhdl +elab repro +if ghdl_has_feature repro vcd; then + simulate repro --vcd=repro-std.vcd + simulate repro --vcd=repro-vlg.vcd --vcd-4states + + if fgrep -q "U!" repro-vlg.vcd; then + echo "error: non-verilog state in vcd" + exit 1; + fi +fi + +clean +rm -f repro-*.vcd + +echo "Test successful" |