Professional Documents
Culture Documents
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
USE IEEE.NUMERIC_STD.ALL;
entity ULA is
port(
a : in std_logic_vector(3 downto 0);
b : in std_logic_vector(3 downto 0);
seletor : in std_logic_vector(1 downto 0);
result : out std_logic_vector(3 downto 0);
bar : out std_logic_vector(6 downto 0)
);
end ULA;
begin
process(a,b,seletor)
begin
process(result_temp)
begin
-- COMENTAR AS LINHAS 44 A 51 E 74 ('IF' ATE 'ELSE' E 'END IF') CASO
DESEJE REALIZAR AS OPERACOES ARITMETICAS
if seletor="00" or seletor="01" or seletor="11" then
case(operator_tmp) is
when true => bar <= "1111001"; --'1'
when false => bar <= "1000000"; --'0'
when others => bar <= "1111111";
end case;
else
case(result_temp) is -- DECODIFICADOR
end if;
end process;
end architecture;