Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Floating Point Powers and Logs?

Reply
Thread Tools

Floating Point Powers and Logs?

 
 
Mike Delaney
Guest
Posts: n/a
 
      10-02-2004
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
 
Reply With Quote
 
 
 
 
Ken Smith
Guest
Posts: n/a
 
      10-02-2004
In article <(E-Mail Removed)>,
Mike Delaney <(E-Mail Removed)> 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.

--
--
http://www.velocityreviews.com/forums/(E-Mail Removed) forging knowledge

 
Reply With Quote
 
 
 
 
David Bishop
Guest
Posts: n/a
 
      10-03-2004
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

 
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
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
floating point problem... floating indeed :( teeshift Ruby 2 12-01-2006 01:16 AM
converting floating point to fixed point H aka N VHDL 15 03-02-2006 02:26 PM
floating point to fixed point conversion riya1012@gmail.com C Programming 4 02-22-2006 05:56 PM
Fixed-point format for floating-point numbers Motaz Saad Java 7 11-05-2005 05:33 PM



Advertisments