-- IEEE Library LIBRARY ieee; USE ieee.std_logic_1164.all; use IEEE.std_logic_unsigned.all; ENTITY Player_Mux2 IS generic (n: integer := 2); -- Number of players PORT( PL_Value : OUT STD_LOGIC; PL_Vector: IN STD_LOGIC_VECTOR (n-1 downto 0); PL_Select: IN STD_LOGIC_VECTOR (3 downto 0) ); END Player_Mux2; architecture behavior of Player_Mux2 is begin --PL_Status_Mux --This mux selects the player's status depending on his turn PL_Status_Mux: process (PL_Vector, PL_Select) begin case PL_Select is when "0001" => PL_Value <= PL_Vector(0); when "0010" => PL_Value <= PL_Vector(1); when others => PL_Value <= '0'; -- Default value end case; end process; end behavior;