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/ent6.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/ent6.vhdl')
-rw-r--r-- | testsuite/gna/issue1549/ent6.vhdl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gna/issue1549/ent6.vhdl b/testsuite/gna/issue1549/ent6.vhdl new file mode 100644 index 000000000..eed31b5f5 --- /dev/null +++ b/testsuite/gna/issue1549/ent6.vhdl @@ -0,0 +1,28 @@ +entity ent6 is + generic ( + WIDTH : natural := 1); +end ent6; + +architecture ent of ent6 is + type bv_array_t is array (natural range <>) of bit_vector; + subtype bv_array2_t is bv_array_t(open)(WIDTH - 1 downto 0); + + procedure write_data (constant c : bv_array2_t) is + begin + for i in c'range loop + report integer'image(i) & " =>" & to_string(c(i)); + end loop; + + assert c(1)(0) = '1'; -- <<<<<====== This should not fail + end procedure; + +begin + process + variable data2 : bv_array2_t(0 to 1); + begin + data2(0) := "0"; + data2(1) := "1"; + write_data(data2); + wait; + end process; +end ent; |