1多路複用器,我需要用4創建XOR:1多路複用器(我知道這是一個不容易復...)XOR使用4:VHDL
我發現這個有用的例子4:1
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity multiplexer4_1 is
port (
i0 : in std_logic;
i1 : in std_logic;
i2 : in std_logic;
i3 : in std_logic;
sel : in std_logic_vector(1 downto 0);
bitout : out std_logic
);
end multiplexer4_1;
architecture Behavioral of multiplexer4_1 is
begin
process(i0,i1,i2,i3,sel)
begin
case sel is
when "00" => bitout <= i0;
when "01" => bitout <= i1;
when "10" => bitout <= i2;
when others => bitout <= i3;
end case;
end process;
end Behavioral;
但我有點困惑如何告訴多路複用器輸出1時01或10是輸入和0,否則。 我可以給i0-i3分配值嗎?對不起,我是VHDL的新手
多少輸入你不異或門必須有? – simon 2013-04-29 15:20:22
它有2個門。 – arnoapp 2013-04-29 15:41:07