aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1549/ent6.vhdl
blob: eed31b5f548bc84141aafcb34bb8498ef4e874b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;