aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/if02/if03.vhdl
blob: 6ff89635878b3f92ec80f29a5ee29b2706c1c204 (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 if03 is
  port (a : std_logic;
        b : std_logic;
        sel : std_logic;
        s : out std_logic);
end if03;

architecture behav of if03 is
begin
  process (a, b, sel)
  begin
    if sel = '0' then
      s <= a;
    elsif sel = '1' then
      s <= b;
    end if;
  end process;
end behav;