aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/synth179/repro2.vhdl
blob: 099578aaf9ece857ef5a5884548c75f961ae4a9e (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
29
30
31
library ieee;
use ieee.std_logic_1164.all;

entity repro2 is
  port (aclr : std_logic;
        clk : std_logic;
        din : std_logic;
        dout : out std_logic);
end;

architecture behav of repro2 is
  signal r : std_logic;
begin
  process (aclr, clk) is
    variable init : boolean := false;
  begin
    if not init then
      r <= '0';
      init := true;
    end if;

    if rising_edge (clk) then
      r <= din;
    end if;
    if aclr = '1' then
      r <= '0';
    end if;
  end process;

  dout <= r;
end behav;