summaryrefslogtreecommitdiff
path: root/testsuite/gna/bug017/case2.vhdl
blob: eff79c5539c7908e8b657b8d8320063066a8c2db (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 case1 is
end;

architecture behav of case1 is
  type vec2 is array (natural range <>) of bit_vector (1 to 4);
  constant vects : vec2 := (x"0", x"4", x"9", x"3", x"a");
begin
  process
    variable i : natural := 0;
  begin
    for i in vects'range loop
      case vects (i) is
        when "0100" =>
          report "value is 4";
          wait for 4 ns;
        when "0011" =>
          report "value is 3";
          wait for 3 ns;
        when others =>
          report "unknown value";
          wait for 1 ns;
      end case;
    end loop;
    report "SUCCESS";
    wait;
  end process;
 
end behav;