aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/dff01/dff04.vhdl
blob: 29ea5fee0c87b6bbeed053d901115804714adc11 (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;
use ieee.numeric_std.all;

entity dff04 is
  port (r : out std_logic_vector(7 downto 0);
        d : std_logic_vector(7 downto 0);
        clk : std_logic);
end dff04;

architecture behav of dff04 is
  signal q : std_logic_vector(7 downto 0);
begin
  process (clk, q) is
  begin
    if rising_edge (clk) then
      q <= d;
    end if;
    r <= std_logic_vector(unsigned(q) + 1);
  end process;
end behav;