answersLogoWhite

0


Best Answer

entity priorityenc is

Port ( EI_L : in STD_LOGIC;

I_L : in STD_LOGIC_VECTOR (7 downto 0);

A_L : out STD_LOGIC_VECTOR (2 downto 0);

E0_L : out STD_LOGIC;

GS_L : out STD_LOGIC);

end priorityenc;

architecture Behavioral of priorityenc is

signal EI: std_logic;

signal I: std_logic_vector(7 downto 0);

signal E0, GS: std_logic;

signal A: std_logic_vector(2 downto 0);

begin

process (EI_L , I_L, EI, E0, GS, I, A)

variable j: INTEGER range 7 downto 0;

begin

EI <= not EI_L; -- convert Input

I <= not I_L; -- convert inputs

E0 <= '1';

GS <='0';

A <= "000";

if(EI) ='0' then E0 <= '0';

else for j in 7 downto 0 loop

if I(j) ='1'

then GS<='1';

E0 <= '0';

A<= CONV_STD_LOGIC_VECTOR(j,3);

exit;

end if;

end loop;

end if;

E0_L <= not E0; -- convert output

GS_L <= not GS; -- convert output

A_L <= not A; -- convert outputs

end process;

end Behavioral;

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is VHDL program for 8 bit priority encoder?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Electrical Engineering

Why program counter and stack pointer is 16- bit?

Because that's how Intel designed it. Even though the 8085 is an 8-bit computer, the program counter and stack pointer are 16 bits wide in order to support the address bus, which is also 16 bits wide. In the case of the 8086/8088, the program counter and stack pointer are still 16 bits wide, even though the address bus is 20 bits wide, because the 8086/8088 adds segmentation through the 16 bit segment register which is left shifted by 4.


What is ic 8086?

8086 is a 16- bit microprocessor. It has 20-bit address bus. It has 14 16-bit registers. It has multiplexed address and data bus. It provides 33% duty cycle. 8086 supports multiprogramming. It is designed to operate in two modes, i.e. min and max. you can download the simulation program(for running your programs on your computer) at - http://www.ziddu.com/download/15018415/emu_8086.zip.html


Why half adder is so called?

A full adder has a sum bit and a carry bit. A half adder just has a sum bit.


How can you draw a 4 bit full adder using 1 bit full adder?

The 1 bit full adder has three inputs, A, B, and CarryIn. It has two outputs, Result and CarryOut. To connect multiple 1 bit full adders together, bus the A and B inputs into their respective buses, bus the Result outputs into its bus, connect the low order bit's CarryIn to LogicFalse, and daisy chain each bit's CarryOut into the next bit's CarryIn. Use the last bit's CarryOut as overall CarryOut.


Design 2-bit comparator using gates?

2 bit comparator = 1bit magnitude comparator +1 bit magnitude comparator if A&gt;B =A(~B)(B bar); if A&lt;B = ~A.B; A==B = AB + (~A)(~B); block of instruction shown above is for 1 bit comparator means if A&gt;B ==true then High bit is set on (A&gt;B) output. if A&lt;B true then high bit is set on (A==B) output, If we cascade two 1 bit comparator then we can design 2-bit comparator...

Related questions

What are the disadvantages of priority encoder?

For a priority encoder, priority is given to that input that has a larger value compared to the others. i.e., if for a 3 bit output, we have both 6 and 3 as active, then 6 is given priority over 3 and the output will be 110


Vhdl program for a 3 bit ripple counter using flip flops?

library ieee; use ieee.std_logic_1164.all; entity 3bitrc is port(


What is Bit And Bit vector in VHDL programming?

These are predefined words in VHDL standards. Bit indicates that the data type is a bit i. e. 0 or 1. A bit_vector is an array of bits. example: a: in bit; b: in bit_vector(1 downto 0);


What is The resolution of 8 bit optical encoder?

28 = 256, so an 8 bit encoder would have a resolution of one part in 256, or 0.39%.


What is vhdl code for 2 bit sliced processor?

library ieee;


What is STD logic in vhdl?

In VHDL, std_logic is a data type. It is assigned to input and / or output variables. It means that the variable is a standard logic type i. e. a logic bit which accepts or provides one bit data, either 1 or 0.


What is VHDL program for half adder in behavioral model?

PROGRAM:Library ieee;use ieee.std_logic_1164.all;entity ha1 isport(a,b:in bit;s,c:out bit);end ha1;architecture ha1 of ha1 isbegins


What is the purpose of a channel encoder and decoder in modern communication systems?

channel encoder inserts additional information to the transmitted bit stream to facilitate error detection and correction at the receiver. channel decoder is quite opposite to the channel encoder which transmits desired data after the error detection and correction .


How do you add 8 bit number with diagram of various IC pin?

for addition of 8 numbers by IC , first we have to connect all bit numbers on different pins of IC &amp; then take the output on remaining pins , For these first we have to make a program for vhdl in FPGA (field programmable gate array) &amp; proceed accordingly .


Which of the two Windows 2000XP setup programs is a 32-bit program?

The XP setup program is a 32 bit program, while the 2000 setup program is a 16 bit program.


How does light behave to make rotary encoder work?

A rotary encoder consists of three main parts: light source, optical encoder disc and light sensors. The light source provides the light source to several light sensors. There is an optical encoder disc that selectively blocks light from light source to light sensor. If the light sensor is receiving light, it is first state of electronic circuit. If the light from light source to the sensor is blocked by optical encoder, then sensor is not receiving light and this is second state of sensor output. Therefore, each sensor has two ouputs possible, high or low. Output from one sensor is called a "bit" so for 4 sensors, it is 4 bit output. The light encoder disc is a plastic disc with some area opaque and other areas transparent. Depending upon its rotating position, it passes light to some sensors and blocks light to other remaining sensors. The combination of states of multiple light sensors at a given time due to a certain rotary position of rotary encoder disc is the multi-bit output of that rotary encoder. This multi-bit logic output is used to sense the position, direction of rotation and rotating speed of the rotary encoder. You can read more about rotary encoders at the links given.


How do you use ic 7432 as an 8 to 3 bit encoder?

if you want to use 8*3 encoder than you must the design the circuit according to variable and with the help of k-map and you can not construct the circuit of 8*3 encoder using 7432 (which is or gate ic) only. you need AND gate 7408 and may be NOT 7404 gate according to design.