HOME VHDL CODES C PROGRAMS SOCCER BUZzz TECH INFO


--code for priority encoder:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity priority_encoder_when is
port( a:in std_logic_vector(7 downto 1);
y:out std_logic_vector(2 downto 0));
end priority_encoder_when;

architecture Behavioral of priority_encoder_when is
begin
y<="111" when a(7)='1' else
   "110" when a(6)='1' else
"101" when a(5)='1' else
"100" when a(4)='1' else
"011" when a(3)='1' else
"010" when a(2)='1' else
"001" when a(1)='1' else
"000";
end Behavioral;

The above code has been executed and has been found to have no errors..!  
plz do comment..!
thank u..!! :) :)

0 comments:

Post a Comment

Total Pageviews

About this blog

Contributors

Followers

Powered by Blogger.

Labels