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
- Thiết kế D-FF
- D Flip-flop - asyn reset
- Hướng dẫn từng bước thực hiện mạch đếm 3 bit với phần mềm Quartus II
- Thiết kế mạch giải đa hợp 1 ngõ vào, 4 ngõ ra, 2 ngõ lựa chọn - VHDL
- Thiết kế mạch đa hợp 4 ngõ vào, 1 ngõ ra, 2 ngõ lựa chọn - VHDL
Nhận xét
Không có nhận xét nào:
Đăng nhận xét