VHDL - XILINX CORDIC Algorithm

1.4k views Asked by At

I need to calculate an arctan in VHDL. For this i'm going to use the Cilinx IP Core "Cordic V4.0". This is the datasheet:

https://www.xilinx.com/support/documentation/ip_documentation/cordic_ds249.pdf

I´ve read that the arctan calculation needs input values from -1 to 1.

My values have a range of 2^32 bit (integer, no fraction).

Is it necessary to convert my input values before putting them into the Cordic-Algorithm?

If yes how should they be converted?

Regards, Erik

1

There are 1 answers

2
A. Kieffer On

In the Xilinx specification it is written :

"The input vector, (Xin, Yin), and the output vector, (Xout, Yout) are expressed as a pair of fixed-point 2’s complement numbers with an integer width of 2 bits (1QN format). The input rotation angle, Pin radians, is also expressed as a fixed-point 2’s complement number but with an integer width of 3 bits (2QN format)."

So if you're using a 32 bits wide vector, then the 2 most significant bits will be used as the integer part and the 30 others as decimal part.

If you don't know how fixed point numbers work, I suggest you read a little about it:

https://en.wikipedia.org/wiki/Fixed-point_arithmetic