Beruflich Dokumente
Kultur Dokumente
use IEEE.STD_LOGIC_1164.all;
use ieee.numeric_std.all;
entity encoder is
port(
din : in STD_LOGIC_VECTOR(3 downto 0);
dout : out STD_LOGIC_VECTOR(1 downto 0)
);
end priority_encoder_8_3;
if (din='1000') then
dout <= "11";
elsif (din='0100') then
dout <= "10";
elsif (din(='0010') then
dout <= "01";
elsif (din='0001') then
dout <= "00";
end if;
end process ;
end arc;