Examen 3
En esta parte mostramos el armado de un circuito con componentes.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity examen is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c : in STD_LOGIC;
d : in STD_LOGIC;
q : out STD_LOGIC;
p : out STD_LOGIC);
end examen;
architecture Behavioral of examen 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;
component compuertaor2 is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
q : out STD_LOGIC);
end component;
component notgate is
Port ( i : in STD_LOGIC;
q : out STD_LOGIC);
end component;
component compuertaxnor is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
q : out STD_LOGIC);
end component;
component componentenand is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
q : out STD_LOGIC);
end component;
SIGNAL c1, c2, c3, c4, c5, c6, c7, c8, c9, c10 :STD_LOGIC;
begin
U0: compuertand2 PORT MAP (a, b,c1);
U1: compuertaxor PORT MAP (c, d, c2);
U2: compuertaxnor PORT MAP (c, d, c3);
U3: componentenand PORT MAP (a, b,c4);
U4: compuertaor2 PORT MAP (c1, c2, c5);
U5: compuertand2 PORT MAP (c3, c4, c6);
U6: compuertaxor PORT MAP (c5, c6, q);
U7: compuertaxor PORT MAP (c, d, p);
end Behavioral;
Comentarios
Publicar un comentario