Я пытаюсь присвоить сигналу значение выхода мультиплексора, но не могу найти способ сделать это.
Это код библиотеки work
.
entity mux4a1 is
port(enable: in std_logic;
x: in std_logic_vector(3 downto 0);
sel: in std_logic_vector(1 downto 0);
y: out std_logic);
end mux4a1;
architecture funcional of mux4a1 is
begin
process(enable, x, sel)
begin
if enable = '0' then
y <= '0';
else
case sel is
when "00" => y <= x(0);
when "01" => y <= x(1);
when "10" => y <= x(2);
when others => y <= x(3);
end case;
end if;
end process;
end funcional;
Это мой код:
entity practica1 is
port (x: in std_logic_vector(3 downto 0);
z: out std_logic_vector(3 downto 0));
end practica1;
architecture apartadoE of practica1 is
signal e: std_logic:= '1';
signal i: std_logic_vector (3 downto 0);
signal sel: std_logic_vector (1 downto 0);
begin
z(0) <= '0';
z(2) <= '0';
z(3) <= '0';
i(0) <= x(3) and x(1);
i(1) <= (not x(1)) and (not x(3));
i(2) <= x(1);
i(3) <= not x(1);
-- here is the problem, i don´t how to assign it.
z(1) <= mux: entity work.mux4a1 port map (e, i, sel);
end apartadoE;