library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity dientu_az is
port ( I: in STD_LOGIC_VECTOR(1 downto 0);
Q: out STD_LOGIC_VECTOR(3 downto 0);
E: in STD_LOGIC);
end dientu_az;
architecture giaima_24e of dientu_az is
begin
process(I,E)
begin
if E='0' then Q <= "1111";
else
Case I is
when "00" => Q <= "0111";
when "01" => Q <= "1011";
when "10" => Q <= "1101";
when "11" => Q <= "1110";
when others => null;
end case;
end if;
end process;
end giaima_24e;
0 nhận xét:
Đăng nhận xét