Documentos de Académico
Documentos de Profesional
Documentos de Cultura
entity FA2 is
port ( A : in BIT_VECTOR (1 downto 0);
B : in BIT_VECTOR (1 downto 0);
Ci: in bit;
Co : out BIT;
S : out BIT_VECTOR (1 downto 0)
);
end FA2;
architecture FA2_Arch of FA2 is
signal C: bit_vector (1 downto 0);
component FA is
port(A,B,Ci: in bit;
Co, S: out bit);
end component;
-- componente ya compilada
begin
sum0: FA port map(A(0), B(0), Ci, C(0), S(0));
sum1: FA port map(A(1), B(1), C(0), C(1), S(1));
Co <= C(1);
end FA2_Arch;
________________________________________________________________________________
entity FA4 is
port ( A : in BIT_VECTOR (3 downto 0);
B : in BIT_VECTOR (3 downto 0);
Co : out BIT;
S : out BIT_VECTOR (3 downto 0)
);
end FA4;
architecture FA4_Arch of FA4 is
signal cero: bit;
signal C: bit_vector (3 downto 0);
component FA is
port(A,B,Ci: in bit;
Co, S: out bit);
end component;
-- componente ya compilada
begin
cero <= '0';
sum0: FA port
sum1: FA port
sum2: FA port
sum3: FA port
Co <= C(3);
map(A(0),
map(A(1),
map(A(2),
map(A(3),
B(0),
B(1),
B(2),
B(3),
end FA4_Arch;
________________________________________________________________________________