--Importation des bibliothèques library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; -- Description de l'interface externe entity COMPARATEUR2bits is port( A,B : IN STD_LOGIC_VECTOR (1 dowto 0); -- A et B sont des mots de 2bits : A = A1A0 et B = B1B0 S : OUT STD_LOGIC; end COMPARATEUR2bits; -- Description structurelle architecture EQU_LOG of COMPARATEUR2bits begin S <= ( not(A(1)) and not(A(0)) and not(B(1)) and not(B(0))) or (not(A(1)) and A(0) and not(B(1)) and B(0)) or (A(1) and not(A(0)) and B(1) and not(B(0))) or (A(1) and A(0) and B(1) and B(0)); end EQU_LOG;