HOME VHDL CODES C PROGRAMS SOCCER BUZzz TECH INFO


--code for priority encoder using dataflow method:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

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

architecture Behavioral of priority_encoder is
begin
y(2)<= a(7) or a(6) or a(5)or a(4);
y(1)<= a(7) or a(6) or ((not  a(5)) and (not  a(4)) and (a(3) or  a(2)));
y(0)<= a(7) or ((not a(6)) and (a(5) or ((not a(4)) and (a(3) or ((not a(2)) and a(1))))));
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