General Description:
我使用的 MUX8_5 输入信号全部失效了。我正在使用一个基础原理图编辑器,并面向一个 XC95144 部件。
使用以下 VHDL 解决此问题:
library IEEE;
use IEEE.std_logic_1164.all;
entity mux8_5is
端口 (
one: in STD_LOGIC_VECTOR (7 downto 0);
two: in STD_LOGIC_VECTOR (7 downto 0);
three: in STD_LOGIC_VECTOR (7 downto 0);
four: in STD_LOGIC_VECTOR (7 downto 0);
five: in STD_LOGIC_VECTOR (7 downto 0);
output: out STD_LOGIC_VECTOR (7 downto 0);
sel: in STD_LOGIC_VECTOR (2 downto 0)
);
end mux8_5;
architecture mux8_5_arch of mux8_5 is
begin
process (SEL, one, two, three, four, five)
begin
case SEL is
when "000" => output (7 downto 0)<= one(7 downto 0) ;
when "001" => output (7 downto 0) <= two (7 downto 0) ;
when "010" => output (7 downto 0) <= three (7 downto 0) ;
when "011" => output (7 downto 0) <= four (7 downto 0) ;
when "100" => output (7 downto 0) <= five (7 downto 0) ;
when others => NULL;
end case;
end process;
end mux8_5_arch;
AR# 11894 | |
---|---|
日期 | 03/03/2014 |
状态 | Archive |
Type | 综合文章 |