diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-12-29 18:33:35 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-12-29 18:33:58 +0100 |
commit | 708cbe6c1ff75f5bccb09af043577b50982529b9 (patch) | |
tree | 0e046329d1a63f8b20ad0696532a29625327dd57 /testsuite/gna/issue1549/ent4.vhdl | |
parent | 61315151bc011a063d6a07937fd36068bdff53b6 (diff) | |
download | ghdl-708cbe6c1ff75f5bccb09af043577b50982529b9.tar.gz ghdl-708cbe6c1ff75f5bccb09af043577b50982529b9.tar.bz2 ghdl-708cbe6c1ff75f5bccb09af043577b50982529b9.zip |
testsuite/gna: add tests for #1549
Diffstat (limited to 'testsuite/gna/issue1549/ent4.vhdl')
-rw-r--r-- | testsuite/gna/issue1549/ent4.vhdl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/gna/issue1549/ent4.vhdl b/testsuite/gna/issue1549/ent4.vhdl new file mode 100644 index 000000000..b921879ef --- /dev/null +++ b/testsuite/gna/issue1549/ent4.vhdl @@ -0,0 +1,29 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity ent4 is + generic ( + TUSER_WIDTH : natural := 1); +end ent4; + +architecture ent of ent4 is + type std_logic_array_t is array (natural range <>) of std_logic_vector; + subtype tuser_array_t is std_logic_array_t(open)(TUSER_WIDTH - 1 downto 0); + + procedure write_data (constant tuser : tuser_array_t) is + begin + for i in tuser'range loop + report integer'image(i) & " =>" & to_bstring(tuser(i)); + end loop; + + assert tuser(1)(0) = '1'; -- <<<<<====== This should not fail + end procedure; + + constant data2 : tuser_array_t(0 to 1) := (0 => "0", 1 => "1"); +begin + process + begin + write_data(data2); + wait; + end process; +end ent; |