CORDIC co-processor (CORDIC) RM0440
468/2126 RM0440 Rev 4
The table below lists the functions supported by the CORDIC co-processor.
Several functions take two input arguments, ARG1 and ARG2, and some generate two
results simultaneously, RES1 and RES2. This is a side-effect of the algorithm and means
that only one operation is needed to obtain two values. This is the case, for example, when
performing polar-to-rectangular conversion: sin θ also generates cos θ, while cos θ also
generates sin θ. Similarly for rectangular-to-polar conversion (phase(x,y), modulus(x,y)) and
for hyperbolic functions (cosh θ, sinh θ).
Note: The exponential function, exp x, can be obtained as the sum of sinh x and cosh x.
Furthermore, base N logarithms, log
N
x, can be derived by multiplying ln x by a constant K,
where K = 1/ln N.
For certain functions (atan, log, sqrt) a scaling factor (see Section 17.3.4) can be applied to
extend the range of the function beyond the maximum [-1, 1] supported by the q1.31 fixed
point format. The scaling factor must be set to 0 for all other circular functions, and to 1 for
hyperbolic functions.
Cosine
Table 102. CORDIC functions
Function
Primary
argument (ARG1)
Secondary
argument (ARG2)
Primary
result (RES1)
Secondary
result (RES2)
Cosine angle θ modulus m
Sine angle θ modulus m
Phase x y atan2(y,x)
Modulus x y
atan2(y,x)
Arctangent x none tan
-1
x none
Hyperbolic cosine x none cosh x sinh x
Hyperbolic sine x none sinh x cosh x
Hyperbolic arctangent x none tanh
-1
x none
Natural logarithm x none ln x none
Square root x none
none
Table 103. Cosine parameters
Parameter Description Range
ARG1 Angle θ in radians, divided by π [-1, 1]
ARG2 Modulus m [0, 1]
RES1 m ∙ cos θ [-1, 1]