libraryieee;
useieee.std_logic_1164.all;
useieee.std_logic_signed.all;
entity Add2In is
port( D1 : in std_logic_vector(7 downto 0);
D2 : in std_logic_vector(7 downto 0);
Q : out std_logic_vector(8 downto 0);
Clk: instd_logic);
end Add2In;
architecture A_Add2In of Add2In is
begin
process(Clk)
begin
if Clk = ‘1’and Clk’event then
Q <= (D1(D1’left) & D1) + (D2(D2’eft) & D2);
endif;
endprocess;
end A_Add2In;