Aim:-Program To Implement An Encoder
Aim:-Program To Implement An Encoder
---- Uncomment the following library declaration if instantiating ---- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all;
entity encoder_8_3 is Port ( a : in STD_LOGIC_VECTOR (7 downto 0); q : out STD_LOGIC_VECTOR (2 downto 0)); end encoder_8_3;
begin q<="000" when a="00000001" else "001" when a="00000010" else "010" when a="00000100" else "011" when a="00001000" else "100" when a="00010000"else "101" when a="00100000" else "110" when a="01000000" else "111";
end Behavioral;