aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/if03/if01.vhdl
blob: b1d692d7f2c45a7a9bc5fdcacff8c3e7b9fbd85b (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
library ieee;
use ieee.std_logic_1164.all;

entity if01 is
  port (a : std_logic;
        b : std_logic;
        en1 : std_logic;
        sel1 : std_logic;
        clk : std_logic;
        s1 : out std_logic;
        s2 : out std_logic);
end if01;

architecture behav of if01 is
begin
  process (clk) is
    variable t : std_logic;
  begin
    if rising_edge(clk) then
      if en1 = '1' then
        t := b;
        s1 <= a;
      end if;
      s2 <= t;
    end if;
  end process;
end behav;