0
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity mux is
port (sel: in std_logic;
s0,s1: in std_logic_vector (3 downto 0) ;
sout : out std_logic_vector (3 downto 0));
end mux;
architecture Behavioral of mux is
begin
if sel = '0' then
sout <= s0;
else
sout <= s1;
end if;
end Behavioral;
- 我試圖做一個多路複用器的四位串行加法器輸出。如果cin爲0,那麼它將採用來自第一個加法器的總和爲 - 其中cin爲0,如果cin爲1,那麼它將從我用cin1喂入的第二加法器中獲得總和。然而,如果某處我無法確定 - out,這是一個錯誤。編譯器說錯誤附近,如果其他和結束語句VHDL如果聲明錯誤