CORDIC core :: Overview
Project maintainers
Details
Name: cordic
Created: Sep 25, 2001
Updated: Jan 8, 2013
SVN Updated: Mar 10, 2009
SVN: Browse
Latest version: download (might take a bit to start...)
Statistics: View
Bugs: 3 reported / 1 solved
★ Star 1 you like it: star it!
Other project properties
Category: Arithmetic core
Language: VHDL
Development status: Stable
Additional info:
Design done, FPGA proven
WishBone compliant: No
WishBone version: n/a
License: GPL
Description
The CORDIC algorithm is an iterative algorithm to evaluate many mathematical functions, such as trigonometrically functions, hyperbolic functions and planar rotations.
Core Description
As the name suggests the CORDIC algorithm was developed for rotating coordinates, a piece of hardware for doing realtime navigational computations in the 1950's. The CORDIC uses a sequence like successive approximation to reach its results. The nice part is it does this by adding/subtracting and shifting only. Suppose we want to rotate a point(X,Y) by an angle(Z). The coordinates for the new point(Xnew, Ynew) are:

Xnew = X * cos(Z)  Y * sin(Z)
Ynew = Y * cos(Z) + X * sin(Z)

Xnew / cos(Z) = X  Y * tan(Z)
Ynew / cos(Z) = Y + X * tan(Z)

X(n+1) = P(n) * ( X(n)  Y(n) / 2^n)
Y(n+1) = P(n) * ( Y(n) + X(n) / 2^n)
Z(n) = atan(1/2^n)

P = cos(atan(1/2^0)) * cos(atan(1/2^1)) * cos(atan(1/2^2))....cos(atan(1/2^n))

Xnew = 0.607... * sum( X(n)  Y(n) / 2^n)
Ynew = 0.607... * sum( Y(n) + X(n) / 2^n)

For i=0 to n1

If (Z(n) >= 0) then

X(n + 1) := X(n) – (Yn/2^n);
Y(n + 1) := Y(n) + (Xn/2^n);
Z(n + 1) := Z(n) – atan(1/2^i);

X(n + 1) := X(n) + (Yn/2^n);
Y(n + 1) := Y(n) – (Xn/2^n);
Z(n + 1) := Z(n) + atan(1/2^i);