diff options
-rw-r--r-- | testsuite/gna/issue151/tb.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/gna/issue151/testsuite.sh | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue151/tb.vhdl b/testsuite/gna/issue151/tb.vhdl new file mode 100644 index 000000000..8aadd3f4b --- /dev/null +++ b/testsuite/gna/issue151/tb.vhdl @@ -0,0 +1,19 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is + port (in_vec : in std_logic_vector); +end entity; + +architecture rtl of test is +signal A : natural; +begin + + gen2 : if in_vec'length <= 2 generate + A <= 2; + end generate; + gen3 : if in_vec'length > 2 generate + A <= 3; + end generate; +end architecture; diff --git a/testsuite/gna/issue151/testsuite.sh b/testsuite/gna/issue151/testsuite.sh new file mode 100755 index 000000000..a77ea351b --- /dev/null +++ b/testsuite/gna/issue151/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze tb.vhdl +clean + +echo "Test successful" |