Floating Point Powers and Logs?

Discussion in 'VHDL' started by Mike Delaney, Oct 2, 2004.

  1. Mike Delaney

    Mike Delaney Guest

    Does anyone have any suggestions on how to do Logs and Powers?
    Part of the design I'm working on has "log(1 + B^d)", and we're pretty
    much stuck there.
    So far, the ideas being kicked around are to either use the Taylor
    series (I'm not the biggest fan of this), or to try to use CORDIC.
    I haven't found any free/open IP that looked like it would work, the
    closest being a couple of (fixed-point) CORDIC cores from Open Cores.
    Accuracy and speed are the two main concerns, but memory is tight, so
    I don't know if a lookup table is doable. Are there any other
    approximations that might work, and might be easier to implement using
    floating point? And how do the hardware implementations in some FPU's
    work?

    Thanks,
    Mike
     
    Mike Delaney, Oct 2, 2004
    #1
    1. Advertising

  2. Mike Delaney

    Ken Smith Guest

    In article <>,
    Mike Delaney <> wrote:
    >Does anyone have any suggestions on how to do Logs and Powers?
    >Part of the design I'm working on has "log(1 + B^d)", and we're pretty


    If this is the only log and power you need to do and if either "B" or "d"
    is a constant, I'd be suggest trying to do the whole function in one go.
    I'd be very tempted to come up with a function that is sort of close and
    then use a Taylor series to fix it.

    If "d" is the only variable, breaking it into 2 ranges, one for each sign
    of "d" would be a natural thing to do.

    --
    --
    forging knowledge
     
    Ken Smith, Oct 2, 2004
    #2
    1. Advertising

  3. Mike Delaney

    David Bishop Guest

    Mike Delaney wrote:

    I've already implemented these for the VHDL-200x.
    http://www.eda.org/vhdl-200x/vhdl-200x-ft/files.html
    Take a look at "fphdl_base_alg_pkg.vhd", in floating point.

    You will also find synthesizable fixed and floating point packages
    here. Please give them a try, we need more people pounding on
    this code.

    These series are debugged and working, but not optimized, which is
    why they are not being made part of the standard.

    > Does anyone have any suggestions on how to do Logs and Powers?
    > Part of the design I'm working on has "log(1 + B^d)", and we're pretty
    > much stuck there.
    > So far, the ideas being kicked around are to either use the Taylor
    > series (I'm not the biggest fan of this), or to try to use CORDIC.
    > I haven't found any free/open IP that looked like it would work, the
    > closest being a couple of (fixed-point) CORDIC cores from Open Cores.
    > Accuracy and speed are the two main concerns, but memory is tight, so
    > I don't know if a lookup table is doable. Are there any other
    > approximations that might work, and might be easier to implement using
    > floating point? And how do the hardware implementations in some FPU's
    > work?
    >
    > Thanks,
    > Mike
     
    David Bishop, Oct 3, 2004
    #3
    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. H aka N
    Replies:
    15
    Views:
    15,670
    Ben Jones
    Mar 2, 2006
  2. Motaz Saad
    Replies:
    7
    Views:
    6,495
  3. Replies:
    4
    Views:
    1,291
    Default User
    Feb 22, 2006
  4. Saraswati lakki
    Replies:
    0
    Views:
    1,348
    Saraswati lakki
    Jan 6, 2012
  5. teeshift
    Replies:
    2
    Views:
    259
    Chris Pearl
    Dec 1, 2006
Loading...

Share This Page