-- Comparador

-- Declaración de librerías
Library ieee;
Use ieee.std_logic_1164.ALL;
Use
ieee.std_logic_unsigned.ALL;

-- Declaración de la entidad
Entity comparad_bhr is
port (
a, b: in std_logic_vector(2 downto 0);
igual, mayor, menor: out boolean);

end comparad_bhr ;

-- Definición de la arquitectura
Architecture bhr of comparad_bhr is

begin

mayor <= a>b;
menor <= a<b;
igual <= a=b;

end bhr;


WcN - Joan Oliver. Diseño de circuitos digitales con VHDL