library ieee; use ieee.std_logic_1164.all; entity Encodeur is port( Entree : in std_logic_vector(2 downto 0); Sortie : out std_logic_vector(1 downto 0)); end Encodeur; architecture ProCase of Encodeur is --begin --process (Entree) --begin --case? Entree is --when "1--" => Sortie <= "11" ; --when "01-" => Sortie <= "10" ; --when "001" => Sortie <= "01" ; --when others => Sortie <= "00" ; --end case? ; --end process; begin with Entree select Sortie <= "11" when "1--", "10" when "01-", "01" when "001", "00" when others; end ProCase;