Log implementation in vhdl

Discussion in 'VHDL' started by praveen.rajaretnam@gmail.com, Jun 24, 2005.

  1. Guest

    Hi all, how can we implement logarithm of a number in VHDL.
    any tips ??? thanx
     
    , Jun 24, 2005
    #1
    1. Advertising

  2. TigerJade Guest

    LUT?
     
    TigerJade, Jun 24, 2005
    #2
    1. Advertising

  3. On 24 Jun 2005 07:36:14 -0700, 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:
    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.
     
    Jonathan Bromley, Jun 24, 2005
    #3
  4. David Bishop Guest

    David Bishop, Jun 25, 2005
    #4
  5. Guest

    Thanks.

    Jonathan Bromley wrote:
    > On 24 Jun 2005 07:36:14 -0700, 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:
    > 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.
     
    , Jun 25, 2005
    #5
  6. Mirko Liss Guest

    :
    > 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.
     
    Mirko Liss, Jun 27, 2005
    #6
    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. Henrik_the_boss
    Replies:
    0
    Views:
    2,676
    Henrik_the_boss
    Nov 5, 2003
  2. Amratash
    Replies:
    0
    Views:
    544
    Amratash
    Apr 13, 2004
  3. =?Utf-8?B?VG9tIFdpbmdlcnQ=?=

    My.Log.Writeexception not writing to Application Event Log.

    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,394
    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=
    Jan 20, 2006
  4. unomystEz
    Replies:
    0
    Views:
    569
    unomystEz
    Nov 19, 2006
  5. afd
    Replies:
    1
    Views:
    8,417
    Colin Paul Gloster
    Mar 23, 2007
Loading...

Share This Page