Professional Documents
Culture Documents
4 - 4
4 - 4
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
use IEEE.std_logic_unsigned.all;
entity design is
component Suma
Port ( A,B : in STD_LOGIC_VECTOR (1 downto 0);
F : out STD_LOGIC_VECTOR (1 downto 0)
);
end component;
component Resta
Port ( A,B : in STD_LOGIC_VECTOR (1 downto 0);
F : out STD_LOGIC_VECTOR (1 downto 0)
);
end component;
component Multiplexor
Port ( M0,M1 : in STD_LOGIC_VECTOR (1 downto 0);
Sel :in STD_LOGIC;
Z : out STD_LOGIC_VECTOR (1 downto 0)
);
end component;
-- Señales internas
signal Suma, Resta : STD_LOGIC_VECTOR (1 downto 0):= (others => '0');
begin
end Behavioral;