diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-11-30 07:43:47 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-11-30 07:43:47 +0100 |
commit | 3bd9a185da8178e878e8034e04aab2238bab50ff (patch) | |
tree | 02e7dd631d6259abdd953ff44c0cf086f23fac18 /testsuite | |
parent | 5e41b6a696f8f1e180d08430a70440f9c9894ea4 (diff) | |
download | ghdl-3bd9a185da8178e878e8034e04aab2238bab50ff.tar.gz ghdl-3bd9a185da8178e878e8034e04aab2238bab50ff.tar.bz2 ghdl-3bd9a185da8178e878e8034e04aab2238bab50ff.zip |
testsuite: add case for #1047
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/synth/issue1047/testsuite.sh | 12 | ||||
-rw-r--r-- | testsuite/synth/issue1047/top.vhdl | 41 |
2 files changed, 53 insertions, 0 deletions
diff --git a/testsuite/synth/issue1047/testsuite.sh b/testsuite/synth/issue1047/testsuite.sh new file mode 100755 index 000000000..4ff5449d8 --- /dev/null +++ b/testsuite/synth/issue1047/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in top; do + synth $t.vhdl -e $t > syn_$t.vhdl +# analyze syn_$t.vhdl +done + +clean + +echo "Test successful" diff --git a/testsuite/synth/issue1047/top.vhdl b/testsuite/synth/issue1047/top.vhdl new file mode 100644 index 000000000..dcdb44524 --- /dev/null +++ b/testsuite/synth/issue1047/top.vhdl @@ -0,0 +1,41 @@ +library ieee; +use ieee.std_logic_1164.ALL; + +entity child is + port ( + A: out std_logic + ); +end entity child; + +architecture rtl of child is +begin + A <= '0'; +end architecture rtl; + + +library ieee; +use ieee.std_logic_1164.ALL; + +entity top is + port ( + A: out std_logic_vector(1 downto 0) + ); +end entity top; + +architecture rtl of top is + component child is + port ( + A: out std_logic + ); + end component child; + + constant N: integer := 2; +begin + CHILDGEN: for i in 0 to N-1 generate + begin + CHILDINST : child + port map( + A => A(i) + ); + end generate CHILDGEN; +end architecture rtl; |