Medio sumador
Medio sumador
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if
instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity medio_sumador is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c :
out STD_LOGIC;
s: out STD_LOGIC);
end medio_sumador;
architecture Behavioral of medio_sumador is
component compuertand2 is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
q :
out STD_LOGIC);
end component;
component compuertaxor is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
q :
out STD_LOGIC);
end component;
begin
U0: compuertand2 PORT MAP (a,b,s);
U1: compuertaxor PORT
MAP (a,b,c);
end Behavioral;
Comentarios
Publicar un comentario