library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity dientuaz is
port (
I: in std_logic_vector(7 downto 0);
Q: out std_logic_vector(2 downto 0)
);
end dientuaz;
architecture dientuaz of dientuaz is
begin
process(I)
begin
case I is
when "11111110" =>Q<= "000";
when "11111101" =>Q<= "001";
when "11111011" =>Q<= "010";
when "11110111" =>Q<= "011";
when "11101111" =>Q<= "100";
when "11011111" =>Q<= "101";
when "10111111" =>Q<= "110";
when "01111111" =>Q<= "111";
when others => null;
end case;
end process;
end dientuaz;
0 nhận xét:
Đăng nhận xét