aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/var01/var05.vhdl
blob: 2965e3c1af1b27c116508302eb0f04d4f4d53c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
library ieee;
use ieee.std_logic_1164.all;

entity var05 is
  port (sel : std_logic;
        a, b : std_logic_vector (1 downto 0);
        res : out std_logic_vector (1 downto 0));
end var05;

architecture behav of var05 is
begin
  process (all)
    variable idx : integer;
  begin
    res <= a;
    if sel = '1' then
      idx := 1;
      res <= b;
    end if;
  end process;
end behav;