Bài tập 3-5: Thiết kế mạch mã hoá 8 đường sang 3 đường với các ngõ vào tích cực mức thấp
Thứ Hai, 4 tháng 5, 2015 - Blade1407
Xem với phiên bản web đầy đủ
Xem với phiên bản web đầy đủ
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;
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;
Bài liên quan
- Bài tập 3-16: Thiết kế mạch chuyển đổi số nhị phân 8 bit thành số BCD.
- Johnson Counter 4 bit & 8bit
- Mạch Logic 1
- 7-segment decoder
- Thiết kế RS-FF
Nhận xét
Không có nhận xét nào:
Đăng nhận xét