library ieee ;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity dientuaz is
port (
E: std_logic_vector(1 downto 0);
I: in std_logic_vector(2 downto 0);
Q: out std_logic_vector(7 downto 0)
);
end dientuaz;
architecture dientuaz of dientuaz is
begin
process(I,E)
begin
if E="00" or E="01" or E="10" then Q<="11111111";
else
case I is
when "000" => Q <= "11111110";
when "001" => Q <= "11111101";
when "010" => Q <= "11111011";
when "011" => Q <= "11110111";
when "100" => Q <= "11101111";
when "101" => Q <= "11011111";
when "110" => Q <= "10111111";
when "111" => Q <= "01111111";
when others => null;
end case;
end if;
end process;
end dientuaz;
Clock : 160 ; 80; 40; 20; 10
0 nhận xét:
Đăng nhận xét