Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Exponential code in VHDL

Reply
Thread Tools

Exponential code in VHDL

 
 
Zaid Al-Hilli
Guest
Posts: n/a
 
      07-27-2011
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.5)));

Would you please help me in that?

Many thanks in advance...

Zaid
 
Reply With Quote
 
 
 
 
Benjamin Couillard
Guest
Posts: n/a
 
      07-27-2011
On 27 juil, 05:19, Zaid Al-Hilli <(E-Mail Removed)> 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.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.
 
Reply With Quote
 
 
 
 
noobie
Guest
Posts: n/a
 
      07-28-2011
On Jul 27, 2:19*pm, Zaid Al-Hilli <(E-Mail Removed)> 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.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.
 
Reply With Quote
 
jeppe jeppe is offline
Senior Member
Join Date: Mar 2008
Location: Denmark
Posts: 348
 
      07-28-2011
Find inspiration here:

http://users-tima.imag.fr/cis/guyot/...sh/Fonctio.htm

Jeppe
 
Reply With Quote
 
RADNOR RADNOR is offline
Junior Member
Join Date: Jul 2011
Posts: 4
 
      07-28-2011
figure out at least something by yourself about your homework assignment before posting a lameass question like "how to do it"
 
Reply With Quote
 
Zaid Al-Hilli
Guest
Posts: n/a
 
      07-29-2011
On Jul 27, 7:23*pm, Benjamin Couillard <(E-Mail Removed)>
wrote:
> On 27 juil, 05:19, Zaid Al-Hilli <(E-Mail Removed)> 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.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.


Thanks a lot!
 
Reply With Quote
 
Zaid Al-Hilli
Guest
Posts: n/a
 
      07-29-2011
On Jul 27, 6:09*pm, Rob Gaddi <(E-Mail Removed)> wrote:
> On 7/27/2011 2:19 AM, Zaid Al-Hilli 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.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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exponential in VHDL cLaRe VHDL 0 07-11-2008 02:39 PM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
Exponential diegoandrade@gmail.com C++ 1 02-11-2005 03:18 AM
Exponential Notation and integers Timothy Fitz Python 4 11-19-2004 02:28 AM
Re: See data in exponential format Eric Lawrence [MSFT] ASP .Net 3 03-02-2004 10:26 AM



Advertisments