Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Log implementation in vhdl

Reply
Thread Tools

Log implementation in vhdl

 
 
praveen.rajaretnam@gmail.com
Guest
Posts: n/a
 
      06-24-2005
Hi all, how can we implement logarithm of a number in VHDL.
any tips ??? thanx

 
Reply With Quote
 
 
 
 
TigerJade
Guest
Posts: n/a
 
      06-24-2005
LUT?

 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      06-24-2005
On 24 Jun 2005 07:36:14 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

>Hi all, how can we implement logarithm of a number in VHDL.
>any tips ??? thanx


A normaliser counts leading zeros and extracts the mantissa,
so giving the logarithm to within 6dB. Typically you can
then do table lookup on the top few bits of the normalised
result, to get some more accuracy.

Obviously, it depends on the precision you need.

Standard methods such as Taylor series and CORDIC may also
be useful if you want really high precision. Once again,
it's MUCH easier if you normalise the number first, so that
you only need to find the log of a number in the range
0.5 to 1.0
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail:(E-Mail Removed)
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
Reply With Quote
 
David Bishop
Guest
Posts: n/a
 
      06-25-2005
(E-Mail Removed) wrote:

> Hi all, how can we implement logarithm of a number in VHDL.
> any tips ??? thanx


You'll find one is the floating point algorithms:

http://www.eda.org/vhdl-200x/vhdl-20...ges/files.html
The file is:
http://www.eda.org/vhdl-200x/vhdl-20...se_alg_pkg.vhd
 
Reply With Quote
 
praveen.rajaretnam@gmail.com
Guest
Posts: n/a
 
      06-25-2005
Thanks.

Jonathan Bromley wrote:
> On 24 Jun 2005 07:36:14 -0700, (E-Mail Removed) wrote:
>
> >Hi all, how can we implement logarithm of a number in VHDL.
> >any tips ??? thanx

>
> A normaliser counts leading zeros and extracts the mantissa,
> so giving the logarithm to within 6dB. Typically you can
> then do table lookup on the top few bits of the normalised
> result, to get some more accuracy.
>
> Obviously, it depends on the precision you need.
>
> Standard methods such as Taylor series and CORDIC may also
> be useful if you want really high precision. Once again,
> it's MUCH easier if you normalise the number first, so that
> you only need to find the log of a number in the range
> 0.5 to 1.0
> --
> Jonathan Bromley, Consultant
>
> DOULOS - Developing Design Know-how
> VHDL, Verilog, SystemC, Perl, Tcl/Tk, Verification, Project Services
>
> Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, BH24 1AW, UK
> Tel: +44 (0)1425 471223 mail:(E-Mail Removed)
> Fax: +44 (0)1425 471573 Web: http://www.doulos.com
>
> The contents of this message may contain personal views which
> are not the views of Doulos Ltd., unless specifically stated.


 
Reply With Quote
 
Mirko Liss
Guest
Posts: n/a
 
      06-27-2005
(E-Mail Removed):
> Hi all, how can we implement logarithm of a number in VHDL.
> any tips ??? thanx


Use the shift-and-add Algorithm or maybe the variant used in
D E Knuth volume 1.
 
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
Insertion Sort : C++ implementation 100 times slower than C implementation sanket C++ 7 11-03-2011 05:00 AM
Knowing the implementation, are all undefined behaviours become implementation-defined behaviours? Michael Tsang C Programming 54 03-30-2010 07:46 AM
Knowing the implementation, are all undefined behaviours become implementation-defined behaviours? Michael Tsang C++ 32 03-01-2010 09:15 PM
VHDL-2002 vs VHDL-93 vs VHDL-87? afd VHDL 1 03-23-2007 09:33 AM
Need help on the Permissions needed to log to Event Log from ASP.NET? Henrik_the_boss ASP .Net 0 11-05-2003 10:14 AM



Advertisments