User Guide

The function takes inputs x and y and outputs a=atan2(y, x) and M = K( x
2
+y
2
)
0.5
. M
is the magnitude of the input vector v=(x,y)
T
, scaled by a CORDIC specific constant
that converges to 1.646760258121, which is transcendental, hence has no fixed value.
The functions supports two configurations, depending on the sign attribute of x and y:
If the inputs are signed, the formats give the allowed input range. In this
configuration the output range for a is[−π,+π]. The output range for M depends
on the input range of x and y, according with the magnitude formula.
If the inputs are unsigned, the IP core restricts the output value for a [0,+π/2].
The magnitude value still depends on the formula.
1.3.4. Vector Rotate Function
The vector rotate function takes a vector v= (x,y)
T
given by the two coordinates x and
y and an angle a. The function produces a similarity rotation of vector v by the angle a
to produce the vector v0=(x0,y0)
T
.
Figure 4. Vector Rotate Function
0
x
y
v
y
x
a
x0
y0
v0
|v0|=K|v|
The rotation is a similarity rotation because the magnitude of the produced vector v0
is scaled up by the CORDIC specific constant K(˜1.646760258121). The equations of
the coordinates for vector v0 are:
x0 = K(xcos(a)−ysin(a))
y0 = K(xsin(a)+ ycos(a))
If you set the sign attribute to true for the x,y inputs for the function, the IP core
restricts their range to [−1,1]. You provide the number of fractional bits. The input
angle a is allowed in the range [−π,+π], and has the same number of fractional bits as
the other inputs. You provide the output fractional bits and the total width of the
output is w=wF+3, signed. For unsigned inputs x,y, the IP core restricts the range to
[0,1], the angle a to [0].
1. ALTERA_CORDIC IP Core User Guide
683808 | 2017.05.08
ALTERA_CORDIC IP Core User Guide
Send Feedback
6