Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Regular Visitor
simopal6
Posts: 16
Registered: ‎08-06-2009
0

Implementation logarithm with CORDIC IP core?

Hello,

I need to implement the natural logarithm function and I'm trying to find out if I can use any IP core before implementing it myself. From what I've understood by reading here and there on the web, it could be possible to compute a logarithm by using the Cordic algorithm... However, mathematically, the logarithm depends on the inverse sinh function, which is not implemented by Cordic 4.0. I probably might calculate somehow, but I would need to instantiate too many cores.

Am I making any mistakes or not noticing something or is it actually impossible to computer a logarithm with the Cordic core?

Thank you!

Xilinx Employee
Xilinx Employee
ywu
Posts: 2,861
Registered: ‎11-28-2007
0

Re: Implementation logarithm with CORDIC IP core?

If you use System Generator, you can use the CORDIC LOG reference block in Xilinx Reference Blockset.

Cheers,
Jim
Visitor
kostbill
Posts: 7
Registered: ‎10-29-2010
0

Re: Implementation logarithm with CORDIC IP core?

Hello.

 

I am having the same problem but I cannot use system generator since I don't have MATLAB.

 

Are there any other ways?

 

Thank you.

Expert Contributor
rcingham
Posts: 2,010
Registered: ‎09-09-2010
0

Re: Implementation logarithm with CORDIC IP core?

You could do log2 by a look-up-table, implemented in a psuedo-ROM (by which I mean a BlockRAM initialised to the required value, then never written to).

A bit fiddly, but I have created Pseudo-ROMs for sine and cosine to avoid latency due to CORDIC implementations.

------------------------------------------
"If it don't work in simulation, it won't work on the board."
Xilinx Employee
francism
Posts: 79
Registered: ‎05-23-2008
0

Re: Implementation logarithm with CORDIC IP core?

Hi Could you could write the log2 function as HDL function and then use that to create your array?

 

regards

Mike

Regular Contributor
juergenatduerr
Posts: 88
Registered: ‎02-09-2012
0

Re: Implementation logarithm with CORDIC IP core?

the logarithm depends on the inverse sinh function

 

You can use the atanh instead by expecting ln (x) = atanh((x-1) / (x+1))