On Thu, 14 Mar 2013 22:13:53 -0400

rickman <(E-Mail Removed)> wrote:

> On 3/14/2013 6:23 PM, vhdl_newbie wrote:

> > Hello,

> > I am a beginner with learn VHDL and I need to implement a mathematical formula for a job interview.

> > I have one day to solve this problem so if there is any good samaritan that could help me with this problem, I would really appreciate it.

> >

> > solve this formula for Y

> >

> > Y=(P^2+K*P)/16

> >

> > with

> >

> > P = [0:63]

> > K = [0:4]

> > Y = [0:512]

> >

> > Have a nice day !

>

> If this were a real requirement, I would say there was something wrong

> with it. It could be coded, but it would be hard to actually build. If

> P is a 64 bit integer, it has a range of 0 to 2^64-1. As an exponent of

> K, the result would have 2^64+4 bits. I don't know how to represent

> that in a way that VHDL would understand. Heck, my calculator threw up

> when I tried to calculate it.

>

> Are you sure this is the right question? I can't see any value in

> asking a job candidate such a question.

>

> WAIT! The notation is wonkey! You mean the variables have his range,

> not that many bits, right? That's different. But it still doesn't fit.

> You can't shove the result into the range for Y.

>

> Maybe that's what they want you to tell them?

>
I think you're misreading. That's (P^P+K*P)/16, or P(P+K)/16

> --

>

> Rick
--

Rob Gaddi, Highland Technology --

www.highlandtechnology.com
Email address domain is currently out of order. See above to fix.