Exponential code in VHDL
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 
Re: Exponential code in VHDL
On 27 juil, 05:19, Zaid AlHilli <z.alhil...@gmail.com> wrote:
> 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 lookup 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 32bit wide then I don't think a look up table implemented in a FPGARom will work. 
Re: Exponential code in VHDL
On Jul 27, 2:19*pm, Zaid AlHilli <z.alhil...@gmail.com> wrote:
> 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. 

figure out at least something by yourself about your homework assignment before posting a lameass question like "how to do it"

Re: Exponential code in VHDL
On Jul 27, 7:23*pm, Benjamin Couillard <benjamin.couill...@gmail.com>
wrote: > On 27 juil, 05:19, Zaid AlHilli <z.alhil...@gmail.com> wrote: > > > 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 lookup 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 32bit wide then I don't think a look > up table implemented in a FPGARom will work. Thanks a lot! 
Re: Exponential code in VHDL
On Jul 27, 6:09*pm, Rob Gaddi <rga...@technologyhighland.com> wrote:
> On 7/27/2011 2:19 AM, Zaid AlHilli wrote: > > > 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 > > Yeah, bound the range of y sufficiently that you can implement the > entire thing in a RAM lookup table. > >  > Rob Gaddi, Highland Technology > Email address is currently out of order Thanks a lot! 
All times are GMT. The time now is 10:56 AM. 
Powered by vBulletin®. Copyright ©2000  2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.