aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue531/submod.vhd
blob: e3d3c2af7f49b18ba9a832badb4fd964db6cbc5f (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
library ieee;
   use ieee.std_logic_1164.all;

entity submodule is
port (
   clk    : in  std_logic;
   arg : in  std_logic_vector(7 downto 0);
   res : out std_logic_vector(7 downto 0)
);
end submodule;

architecture rtl of submodule is
begin
  sub_proc : process(clk)
    variable last : std_logic_vector(7 downto 0);
   begin
      if rising_edge(clk) then
         res <= arg XOR last;
         last := arg;
      end if;
   end process sub_proc;
end rtl;