![]() |
|
|
|
#1 |
|
Hi all, how can we implement logarithm of a number in VHDL.
any tips ??? thanx praveen.rajaretnam@gmail.com |
|
|
|
|
#2 |
|
Posts: n/a
|
LUT?
TigerJade |
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
|
|
#4 |
|
Posts: n/a
|
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 David Bishop |
|
|
|
#5 |
|
Posts: n/a
|
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. praveen.rajaretnam@gmail.com |
|
|
|
#6 |
|
Posts: n/a
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to execute an external software from VHDL? And how to interface VHDL with JAVA? | becool_nikks | Software | 0 | 03-06-2009 07:08 PM |
| reading mp3 file in binary format in vhdl | latheesh | General Help Related Topics | 0 | 02-05-2008 05:40 AM |
| Help on auto conversion from Matlab to vhdl on filter design | hardheart | Hardware | 0 | 12-07-2007 09:19 AM |
| ARRAY(n DOWNTO 0) OF STD_LOGIC_VECTOR(m DOWNTO 0) - VHDL | freitass | Hardware | 0 | 11-01-2007 03:44 PM |
| vhdl code | amirster | Hardware | 0 | 05-10-2007 07:28 AM |