Exponential code in VHDL

Discussion in 'VHDL' started by Zaid Al-Hilli, Jul 27, 2011.

  1. 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
    Zaid Al-Hilli, Jul 27, 2011
    #1
    1. Advertising

  2. On 27 juil, 05:19, 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) /
    > 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.
    Benjamin Couillard, Jul 27, 2011
    #2
    1. Advertising

  3. Zaid Al-Hilli

    noobie Guest

    On Jul 27, 2:19 pm, 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) /
    > 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.
    noobie, Jul 28, 2011
    #3
  4. Zaid Al-Hilli

    jeppe

    Joined:
    Mar 10, 2008
    Messages:
    348
    Location:
    Denmark
    jeppe, Jul 28, 2011
    #4
  5. Zaid Al-Hilli

    RADNOR

    Joined:
    Jul 20, 2011
    Messages:
    4
    figure out at least something by yourself about your homework assignment before posting a lameass question like "how to do it"
    RADNOR, Jul 28, 2011
    #5
  6. On Jul 27, 7:23 pm, Benjamin Couillard <>
    wrote:
    > On 27 juil, 05:19, 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) /
    > > 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!
    Zaid Al-Hilli, Jul 29, 2011
    #6
  7. On Jul 27, 6:09 pm, Rob Gaddi <> 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) /
    > > 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!
    Zaid Al-Hilli, Jul 29, 2011
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Lawrence [MSFT]

    Re: See data in exponential format

    Eric Lawrence [MSFT], Mar 1, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    573
    =?Utf-8?B?Sm9yZ2UgTWFnYW50bw==?=
    Mar 2, 2004
  2. Exponential

    , Feb 10, 2005, in forum: C++
    Replies:
    1
    Views:
    984
    Victor Bazarov
    Feb 11, 2005
  3. Timothy Fitz

    Exponential Notation and integers

    Timothy Fitz, Nov 18, 2004, in forum: Python
    Replies:
    4
    Views:
    1,066
    =?ISO-8859-1?Q?F=E1bio?= Mendes
    Nov 19, 2004
  4. afd
    Replies:
    1
    Views:
    8,319
    Colin Paul Gloster
    Mar 23, 2007
  5. cLaRe

    exponential in VHDL

    cLaRe, Jul 11, 2008, in forum: VHDL
    Replies:
    0
    Views:
    1,901
    cLaRe
    Jul 11, 2008
Loading...

Share This Page