diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-10-29 18:51:26 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-10-29 18:51:26 +0200 |
commit | 5665fedba4ec5034df43efdb520b961455c45319 (patch) | |
tree | e014698f4b63fdfa51e4d9d02b678edc432371bb | |
parent | 9e1a00242c2db408bb707e65787862fda3db3fc7 (diff) | |
download | ghdl-5665fedba4ec5034df43efdb520b961455c45319.tar.gz ghdl-5665fedba4ec5034df43efdb520b961455c45319.tar.bz2 ghdl-5665fedba4ec5034df43efdb520b961455c45319.zip |
testsuite/synth: add a test for #1903
-rw-r--r-- | testsuite/synth/issue1903/tb.vhdl | 23 | ||||
-rwxr-xr-x | testsuite/synth/issue1903/testsuite.sh | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/synth/issue1903/tb.vhdl b/testsuite/synth/issue1903/tb.vhdl new file mode 100644 index 000000000..aab6a85fe --- /dev/null +++ b/testsuite/synth/issue1903/tb.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity tb is port ( + clk : in std_logic; + rst : in std_logic; + a : in std_logic; + y : out std_logic); +end entity; + +architecture beh of tb is +signal yo : std_logic; + +procedure ff(signal c: in std_logic; r: in std_logic; i: in std_logic; signal o: out std_logic) is +begin + wait until c'event and c ='1'; + if r = '1' then o <= '0'; else o <= i; end if; +end ff; + +begin + ff(clk, rst, a, yo); + y <= yo; +end beh; diff --git a/testsuite/synth/issue1903/testsuite.sh b/testsuite/synth/issue1903/testsuite.sh new file mode 100755 index 000000000..38a92fd7f --- /dev/null +++ b/testsuite/synth/issue1903/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_failure tb.vhdl -e + +echo "Test successful" |