-- Multiplexor
--Especificación comportamental
--Puede comprobarse su simplicidad (aunque requiere conversión
de tipos)
Library ieee;
use ieee.std_logic_1164.ALL;
use ieee.std_logic_unsigned.ALL;
use ieee.std_logic_arith.ALL;
--Definición de la entidad
Entity mux_bhr is port
(a: in std_logic_vector(15 downto 0);
sel: in std_logic_vector(3 downto 0);
z: out std_logic);
end mux_bhr;
--Arquitectura
Architecture bhr of mux_bhr is
begin
z <= a(conv_integer (sel));
end bhr;