

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; entity MULTIPLICADOR is port( CIN : in STD_LOGIC; A : in STD_LOGIC_VECTOR(2 downto 0); B : in STD_LOGIC_VECTOR(2 downto 0); COUT : out STD_LOGIC; R : out STD_LOGIC_VECTOR(5 downto 0) ); end MULTIPLICADOR; architecture MULTIPLICADOR of MULTIPLICADOR is COMPONENT SUMADOR port( A : in STD_LOGIC; B : in STD_LOGIC; CIN : in STD_LOGIC; COUT : out STD_LOGIC; S : out STD_LOGIC ); END COMPONENT; SIGNAL C : STD_LOGIC_VECTOR (8 DOWNTO 0); SIGNAL CARRY : STD_LOGIC_VECTOR (4 DOWNTO 0); SIGNAL E : STD_LOGIC_VECTOR (1 DOWNTO 0); Begin R(0)<= A(0)AND B(0); C(0)<= A(1)AND B(0); C(1)<= A(0)AND B(1); C(2)<= A(2)AND B(0); C(3)<= A(1)AND B(1); C(4)<= A(2)AND B(1); C(5)<= A(0)AND B(2); C(6)<= A(1)AND B(2); C(7)<= A(2)AND B(2); U0: SUMADOR PORT MAP( A => C(1), B => C(0), CIN => '0', COUT => CARRY(0), S => R(1) );