diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-02-10 18:41:15 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-02-10 18:41:15 +0100 |
commit | 29ff7ac283374e9df1ac1d1fd7d50dd97074bbe5 (patch) | |
tree | 7984c5b71e5d4aa14e0c6e70f402fc04c3df80fa | |
parent | ddd3ad54ef05f593264477bb2ac04228af3d8329 (diff) | |
download | ghdl-29ff7ac283374e9df1ac1d1fd7d50dd97074bbe5.tar.gz ghdl-29ff7ac283374e9df1ac1d1fd7d50dd97074bbe5.tar.bz2 ghdl-29ff7ac283374e9df1ac1d1fd7d50dd97074bbe5.zip |
testsuite/synth: add test for #1130.
Fix #1130
-rw-r--r-- | testsuite/synth/issue1127/foo.vhdl | 22 | ||||
-rwxr-xr-x | testsuite/synth/issue1127/testsuite.sh | 11 |
2 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/synth/issue1127/foo.vhdl b/testsuite/synth/issue1127/foo.vhdl new file mode 100644 index 000000000..4dbdbca86 --- /dev/null +++ b/testsuite/synth/issue1127/foo.vhdl @@ -0,0 +1,22 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity foo is + port ( + addr : in integer; + nibble0 : out std_logic_vector(3 downto 0); + nibble1 : out std_logic_vector(3 downto 0) + ); +end foo; + +architecture foo of foo is + + type data_array_t is array (3 downto 0) of std_logic_vector(7 downto 0); + signal data_buffer : data_array_t; + +begin + + nibble0 <= data_buffer(addr)(3 downto 0); + nibble1 <= data_buffer(addr)(7 downto 4); + +end foo; diff --git a/testsuite/synth/issue1127/testsuite.sh b/testsuite/synth/issue1127/testsuite.sh new file mode 100755 index 000000000..9e68d3bed --- /dev/null +++ b/testsuite/synth/issue1127/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in foo; do + synth $t.vhdl -e $t > syn_$t.vhdl + analyze syn_$t.vhdl + clean +done + +echo "Test successful" |