2个回答
2011-05-10
展开全部
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY DECODE3_8 IS
PORT ( DIN : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
EN : IN STD_LOGIC;
XOUT : OUT STD_LOGIC_VECTOR (7 DOWNTO 0));
END DECODE3_8;
ARCHITECTURE ONE OF DECODE3_8 IS
BEGIN
PROCESS (DIN, EN)
BEGIN
IF EN = ‘1’ THEN
IF DIN = “111” THEN XOUT <= “11111110”;
ELSIF DIN = “110” THEN XOUT <= “11111101”;
ELSIF DIN = “101” THEN XOUT <= “11111011”兄乱;
ELSIF DIN = “100”庆尘没 THEN XOUT <= “11110111”;
ELSIF DIN = “011” THEN XOUT <= “11101111”;
ELSIF DIN = “010” THEN XOUT <= “11011111”;
ELSIF DIN = “001” THEN XOUT <= “10111111”;
ELSE XOUT <誉纳= “11111011”;
END IF;
END PROCESS;
END ONE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY DECODE3_8 IS
PORT ( DIN : IN STD_LOGIC_VECTOR (2 DOWNTO 0);
EN : IN STD_LOGIC;
XOUT : OUT STD_LOGIC_VECTOR (7 DOWNTO 0));
END DECODE3_8;
ARCHITECTURE ONE OF DECODE3_8 IS
BEGIN
PROCESS (DIN, EN)
BEGIN
IF EN = ‘1’ THEN
IF DIN = “111” THEN XOUT <= “11111110”;
ELSIF DIN = “110” THEN XOUT <= “11111101”;
ELSIF DIN = “101” THEN XOUT <= “11111011”兄乱;
ELSIF DIN = “100”庆尘没 THEN XOUT <= “11110111”;
ELSIF DIN = “011” THEN XOUT <= “11101111”;
ELSIF DIN = “010” THEN XOUT <= “11011111”;
ELSIF DIN = “001” THEN XOUT <= “10111111”;
ELSE XOUT <誉纳= “11111011”;
END IF;
END PROCESS;
END ONE;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询