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

entity dff12 is
  port (q : out std_logic;
        d : std_logic;
        clk : std_logic;
        rstn : std_logic);
end dff12;

architecture behav of dff12 is
  signal ff : std_logic := '1';
begin
  process (clk, rstn) is
  begin
    if rising_edge (clk) then
      if rstn = '0' then
        ff <= '0';
      else
        ff <= d;
      end if;
    end if;
  end process;
  q <= ff;
end behav;