diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-02 08:00:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-02 08:00:42 +0200 |
commit | 01c330faaed81ecd4a38bfcdc4838ea0f518e5d7 (patch) | |
tree | 7d3b174e0cc4b5bd4fbe04d48d77ca86e1c6b01a | |
parent | 92046aa68cbbd0b29a0f1c1361bcf634bdb81d78 (diff) | |
download | ghdl-01c330faaed81ecd4a38bfcdc4838ea0f518e5d7.tar.gz ghdl-01c330faaed81ecd4a38bfcdc4838ea0f518e5d7.tar.bz2 ghdl-01c330faaed81ecd4a38bfcdc4838ea0f518e5d7.zip |
testsuite/synth: add a test for #2046
-rw-r--r-- | testsuite/synth/issue2046/engine.vhdl | 88 | ||||
-rwxr-xr-x | testsuite/synth/issue2046/testsuite.sh | 7 |
2 files changed, 95 insertions, 0 deletions
diff --git a/testsuite/synth/issue2046/engine.vhdl b/testsuite/synth/issue2046/engine.vhdl new file mode 100644 index 000000000..ea9fda89d --- /dev/null +++ b/testsuite/synth/issue2046/engine.vhdl @@ -0,0 +1,88 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity phony is + generic ( + INDEX : natural := 0 + ); + port ( + i : in std_logic; + o : out std_logic + ); +end entity; + +architecture synth of phony is + + signal o6 : std_logic := '0'; + + component LUT6 is + generic ( + INIT : bit_vector + ); + port ( + O : out std_logic; + I0 : in std_logic; + I1 : in std_logic; + I2 : in std_logic; + I3 : in std_logic; + I4 : in std_logic; + I5 : in std_logic + ); + end component; + +begin + + lutA : LUT6 + generic map ( + INIT => x"0123456789012345" + ) + port map ( + O => o6, + I0 => i, + I1 => i, + I2 => i, + I3 => i, + I4 => i, + I5 => i + ); + + o <= o6; + +end architecture; + +library ieee; +use ieee.std_logic_1164.all; + +library work; +use work.all; + +entity engine is + generic ( + SIZE : natural := 1000 + ); + port ( + i : in std_logic; + o : out std_logic + ); +end entity; + +architecture synth of engine is + +begin + + chunks : for b in 0 to SIZE-1 generate + + ph : entity phony + generic map ( + INDEX => b + ) + port map ( + i => i, + o => open + ); + + end generate; + + o <= i; + +end architecture; diff --git a/testsuite/synth/issue2046/testsuite.sh b/testsuite/synth/issue2046/testsuite.sh new file mode 100755 index 000000000..47b5b5097 --- /dev/null +++ b/testsuite/synth/issue2046/testsuite.sh @@ -0,0 +1,7 @@ +#! /bin/sh + +. ../../testenv.sh + +synth --std=08 -gsize=4000 engine.vhdl -e > syn_engine.vhdl + +echo "Test successful" |