aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/bug0110/tb4.vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-02-17 18:41:55 +0100
committerTristan Gingold <tgingold@free.fr>2020-02-17 18:41:55 +0100
commit939221749e7f1228ed959d1007a3fd3e3b4b9146 (patch)
treefa7441c3c77fc2e7e9db986dd95eed2ebebc154d /testsuite/gna/bug0110/tb4.vhdl
parentf8a4d339538d5abdaf9f6e29107816c247d5d39f (diff)
downloadghdl-939221749e7f1228ed959d1007a3fd3e3b4b9146.tar.gz
ghdl-939221749e7f1228ed959d1007a3fd3e3b4b9146.tar.bz2
ghdl-939221749e7f1228ed959d1007a3fd3e3b4b9146.zip
testsuite/gna: add tests for previous commit.
Diffstat (limited to 'testsuite/gna/bug0110/tb4.vhdl')
-rw-r--r--testsuite/gna/bug0110/tb4.vhdl31
1 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/gna/bug0110/tb4.vhdl b/testsuite/gna/bug0110/tb4.vhdl
new file mode 100644
index 000000000..54b9b8a62
--- /dev/null
+++ b/testsuite/gna/bug0110/tb4.vhdl
@@ -0,0 +1,31 @@
+package pkg4 is
+ type my_arr is array (1 to 2) of bit_vector (7 downto 0);
+end pkg4;
+
+use work.pkg4.all;
+
+entity ent4 is
+ port (v : out my_arr;
+ b : in bit);
+end ent4;
+
+architecture behav of ent4 is
+begin
+ v <= (others => (others => b));
+end behav;
+
+entity top4 is
+end top4;
+
+use work.pkg4.all;
+architecture behav of top4 is
+ signal s : bit_vector (7 downto 0);
+ signal b : bit;
+begin
+ dut : entity work.ent4
+ port map (
+ v(1)(3 downto 2) => s (3 downto 2),
+ v(2)(7 downto 6) => s (7 downto 6),
+ b => b);
+ b <= '0';
+end behav;