
Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!

ENTITY ULA is PORT( D : IN BIT; B1, B2 : IN integer 0 to 7; -- BOTOES ENTRADA; S: BUFFER BIT_VECTOR(0 DOWNTO 3) -- SAIDA INTERNA PARA TRATAMENTO SAIDA DISPLAY; a,b,c,d,e,f,g,rbo : OUT BIT -- SAIDA DISPLAY; ); end ULA;
ARCHITECTURE AP2 OF ULA IS
PROCESS (D,S, B1, B2) BEGIN
IF D ='0' THEN s <= B1+B2; ELSIF D = '1' THEN S<= (A*B); END IF;
CASE S IS
when "0000" => a<='0'; b<='0'; c<='0'; d<='0'; e<='0'; f<='0'; g<='1'; h<='1'; when "0001" => a<='1'; b<='0'; c<='0'; d<='1'; e<='1'; f<='1'; g<='1'; h<='1'; when "0010" => a<='0'; b<='0'; c<='1'; d<='0'; e<='0'; f<='1'; g<='0'; h<='1'; when "0011" => a<='0'; b<='0'; c<='0'; d<='0'; e<='1'; f<='1'; g<='0'; h<='1'; when "0100" => a<='1'; b<='0'; c<='0'; d<='1'; e<='1'; f<='0'; g<='0'; h<='1'; when "0101" => a<='0'; b<='1'; c<='0'; d<='0'; e<='1'; f<='0'; g<='0'; h<='1'; when "0110" => a<='0'; b<='1'; c<='0'; d<='0'; e<='0'; f<='0'; g<='0'; h<='1'; when "0111" => a<='0'; b<='0'; c<='0'; d<='1'; e<='1'; f<='1'; g<='1'; h<='1'; when "1000" => a<='0'; b<='0'; c<='0'; d<='0'; e<='0'; f<='0'; g<='0'; h<='1'; when "1001" => a<='0'; b<='0'; c<='0'; d<='0'; e<='1'; f<='0'; g<='0'; h<='1'; when OTHERS => a<='1'; b<='1'; c<='1'; d<='1'; e<='1'; f<='1'; g<='1'; h<='1';