0
我正在做一個任務,用n條選擇線做2^n輸出的解複用。我有我的輸入(x位寬,在這種情況下,x是32位)和我的使能引腳照顧。但我不知道如何去設置實體,以便我的輸出是2^n個選擇線。到目前爲止,我的實體聲明如下:如何使用VHDL爲n個選擇行設置1至2^n輸出解複用器的實體?
-- Entity declaration
entity DEMUX is
-- Get the size of an integer
generic(Len :integer);
-- Map input, output, selection and enable signal ports
port(
Inp : in std_logic_vector(Len-1 downto 0); -- Input pin
Ena : in std_logic; -- Enable pin
Sel : --How to set select lines?
Oup : --How to set outputs?
);
end DEMUX;
所以基本上我有一個正在一個輸入是在寬度x位(32位「01001011」序列)解複用。我想把它拿過去,並在解複用器的另一端傳遞2^n個路徑。選擇線決定採取哪條路徑。我想知道如何爲輸出和選擇引腳設置實體聲明。
您的問題並不清楚:您希望選擇引腳做什麼以及您希望輸出顯示什麼? – JHBonarius
@ J.H.Bonarius我已經更新了上面的問題。 – dikshant