Exponential code in VHDL

Z

Zaid Al-Hilli

Hi all,

I am about implementing a VHDL code but I am facing problem, I have an
exponential operation and I want to run that code op an FPGA board!!

Generally speaking the assignment is: X = (1 / (1+ exp((y + 87.8) /
8.5)));

Would you please help me in that?

Many thanks in advance...

Zaid
 
B

Benjamin Couillard

Hi all,

I am about implementing a VHDL code but I am facing problem, I have an
exponential operation and I want to run that code op an FPGA board!!

Generally speaking the assignment is:  X = (1 / (1+ exp((y + 87.8) /
8.5)));

Would you please help me in that?

Many thanks in advance...

Zaid

One simple way would be to use a look-up table implemented in a ROM.
With "y" being the address and X being the data read at "y" address.
This solution would work well if the range of "y" in bits is smaller
or equal to 16 bits. If "y" is 32-bit wide then I don't think a look-
up table implemented in a FPGA-Rom will work.
 
N

noobie

Hi all,

I am about implementing a VHDL code but I am facing problem, I have an
exponential operation and I want to run that code op an FPGA board!!

Generally speaking the assignment is:  X = (1 / (1+ exp((y + 87.8) /
8.5)));

Would you please help me in that?

Many thanks in advance...

Zaid

Use Taylor series expansion for the calculation of this equation. Use
fixed point arithmetic.
 
Joined
Jul 20, 2011
Messages
4
Reaction score
0
figure out at least something by yourself about your homework assignment before posting a lameass question like "how to do it"
 
Z

Zaid Al-Hilli

One simple way would be to use a look-up table implemented in a ROM.
With "y" being the address and X being the data read at "y" address.
This solution would work well if the range of "y" in bits is smaller
or equal to 16 bits. If "y" is 32-bit wide then I don't think a look-
up table implemented in a FPGA-Rom will work.

Thanks a lot!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top