VHDL Mux a 4 ingressi
Ho realizzato una descrizione comportamentale del Mux a 4 ingressi, il codice VHDL è il seguente:
Però il sintetizzatore mi dà i seguenti errori:
Line 24: Syntax error near "process".
Line 25: Expecting type void for <behavioral>
Cosa ho sbagliato?
- Codice: Seleziona tutto
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity mux_4_to_1 is
port( A,B,C,D: in std_logic;
S: in std_logic_vector(1 downto 0);
Z: out std_logic);
end mux_4_to_1;
architecture Behavioral of mux_4_to_1 is
begin
process(A,B,C,D,S)
begin
if S="11" then Z<=A;
else if S="10" then Z<=B;
else if S="01" then Z<=C;
else Z<=D;
end if;
end process;
end Behavioral;
Però il sintetizzatore mi dà i seguenti errori:
Line 24: Syntax error near "process".
Line 25: Expecting type void for <behavioral>
Cosa ho sbagliato?