Bài tập 3-4: Thiết kế mạch giải mã 3 đường sang 8 đường với ngõ ra tích cực mức thấp và có một tín hiệu cho phép E1 tích cực mức cao, và một tín hiệu cho phép E2 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 (
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
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
Bài liên quan
- 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
- Thiết kế mạch giải mã led 7 đoạn loại anode chung
- Thiết kế mạch mã hoá 4 đường sang 2 đường với ngõ vào tích cực mức cao - VHDL
Nhận xét
Không có nhận xét nào:
Đăng nhận xét