Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need help with understanding basic VHDL code for 4-to-2 priority encoder

Status
Not open for further replies.

bobby19

Newbie level 4
Joined
Nov 22, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,318
hey, Im looking for some help in the attached question. We have used VHDL a bit in the lab, but code was pretty much given to us...we have not been formally taught it.

I understand how the input and output vectors are declared and can be thought of as arrays, but I do not understand how this question can be answered. Can somebody please guide me through it.

Thanks a lot!
 

Re: Some Basic VHDL Help

In the code, the operation is defined only in the architecture and the one in the entity are like pins in a chip....

so in the architecture, we see that it is defined as follows.....The Most significant bit in y is y(0) and the MSB in w is w(0)....

so w(3) is the last bit on the right...so....from the first sentence inside the process, we infer that....

if w = XXX1 where X is the dont care, then y(0) =1;
if w = XX10, then y(0) = 0;
if w= X100, then y(0) = 1;
if w= X000, then y(0) = 0;


so, from now on....its basic digital....you can see that the answer is the third choice....by substituting each choice one by one, you could easily find it out.....
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top