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如果声明错误