Cordic v6.0
Cordic v6.0
Chapter 1: Overview
Navigating Content by Design Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Core Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Feature Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Licensing and Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Chapter 5: C Model
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
C Model Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Appendix A: Upgrading
Migrating to the Vivado Design Suite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Upgrading in the Vivado Design Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Appendix B: Debugging
Finding Help on Xilinx.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Debug Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Simulation Debug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
AXI4-Stream Interface Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
All Vivado IP
• Control of the number of add-sub iterations Change Logs
Master Vivado IP Change Logs: 72775
Overview
• Hardware, IP, and Platform Development: Creating the PL IP blocks for the hardware
platform, creating PL kernels, subsystem functional simulation, and evaluating the
Vivado timing, resource and power closure. Also involves developing the hardware
platform for system integration. Topics in this document that apply to this design
process include:
° Port Descriptions
° Clocking
° Resets
Core Overview
The CORDIC core implements a generalized coordinate rotational digital computer
(CORDIC) algorithm, initially developed by Volder [Ref 1] to iteratively solve trigonometric
equations, and later generalized by Walther [Ref 2] to solve a broader range of equations,
including the hyperbolic and square root equations. The CORDIC core implements the
following equation types:
A coarse rotation is performed to rotate the input sample from the full circle into the first
quadrant. (The coarse rotation stage is required as the CORDIC algorithm is only valid over
the first quadrant). An inverse coarse rotation stage rotates the output sample into the
correct quadrant.
The CORDIC algorithm introduces a scale factor to the amplitude of the result, and the
CORDIC core provides the option of automatically compensating for the CORDIC scale
factor.
The CORDIC algorithm can be used to solve several functions as described above. These
functions take different combinations of Cartesian and polar operands. The operands X_IN
and Y_IN are input using the S_AXIS_CARTESIAN channel and the PHASE_IN operand is
input using the S_AXIS_PHASE input.
Feature Summary
• Vector rotation (polar to rectangular)
• Vector translation (rectangular to polar)
• Sin and Cos
• Sinh and Cosh
• Atan
• Atanh
• Square root
Applications
The CORDIC core can be used to implement any of the general purpose functions listed in
Feature Summary.
Product Specification
The equations used to define the CORDIC are detailed in Functional Description in
Chapter 3.
Performance
The latency and throughput of the core is influenced by the selection of Parallel or Serial
Architecture. The resulting basic latency and throughput are described in Parallel
Architectural Configuration and Word Serial Architectural Configuration, though it should
be noted that latency is affected by the form of AXI4-Stream protocol selected. The CORDIC
user interface in the Vivado ® Integrated Design Environment (IDE) shows the latency for the
selected configuration. It should be stated that when AXI blocking mode is selected, latency
should not be a primary design consideration, because the AXI protocol manages data
traffic dynamically.
A parallel CORDIC core with N bit output width has a latency of N cycles and produces a
new output every cycle. The implementation size of this parallel circuit is directly
proportional to the internal precision times the number of iterations.
implements these shift-addsub operations serially, using a single shift-addsub stage and
feeding back the output.
A word serial CORDIC core with N bit output width has a latency of N cycles and produces
a new output every N cycles. The implementation size this iterative circuit is directly
proportional to the internal precision.
Resource Utilization
For details about performance, visit Performance and Resource Utilization.
Port Descriptions
A block diagram of the CORDIC core is presented in Figure 2-1.
X-Ref Target - Figure 2-1
s_axis_cartesian_tvalid m_axis_dout_tvalid
s_axis_cartesian_tready m_axis_dout_tready
s_axis_cartesian_tdata m_axis_dout_tdata
s_axis_cartesian_tuser m_axis_dout_tuser
s_axis_cartesian_tlast m_axis_dout_tlast
s_axis_phase_tvalid
s_axis_phase_tready
s_axis_phase_tdata
s_axis_phase_tuser
s_axis_phase_tlast
aclk
aresetn
aclken
DS858_01_082311
Notes:
1. For AXI4-Stream details see Protocol Description – AXI4-Stream.
Width constants A to F are arbitrary values, determined by the CORDIC Vivado IDE
parameters. Many pins are optional. Input channels are absent if the function selected does
not require the operands carried by the channel in question. For example, the Square Root
function does not require PHASE_IN, so S_AXIS_PHASE is not present for this function.
Notes:
1. A 1 indicates that the subfield and parent channel are present. A 0 indicates that the subfield is absent. If all
subfields of a channel are absent, the channel is also absent. The X_IN operand, if present, is in the least significant
bit positions of S_AXIS_CARTESIAN. SImilarly, X_OUT is in the least significant position of M_AXIS_DOUT, with
Y_OUT in the next significant position and PHASE_OUT in the most significant position. Where one or more is
missing, the remaining operands shift down in bit position. For example, for Translate with an Output_Width of 8,
XOUT is [7:0] and PHASE_OUT is [15:8] of m_axis_dout_tdata.
Clocking
The CORDIC core uses a single clock, called aclk. All input and output interfaces and
internal state are subject to this single clock.
Resets
The CORDIC core uses a single, optional reset input called ARESETn. This signal is
active-Low and must be active or inactive for a minimum of two clock cycles to ensure
correct operation. ARESETn is a global synchronous reset which resets all control states in
the core; all data in transit through the core is lost when ARESETn is asserted.
bypass path for this information. For more information about AXI4-Stream Interfaces see
[Ref 3] and [Ref 4].
Basic Handshake
Figure 3-1 shows the transfer of data in an AXI4-Stream channel. tvalid is driven by the
source (master) side of the channel and tready is driven by the receiver (slave). tvalid
indicates that the value in the payload fields (tdata, tuser, and tlast) is valid. tready
indicates that the slave is ready to receive data. When both tvalid and tready are TRUE
in a cycle, a transfer occurs. The master and slave set tvalid and tready respectively for
the next transfer appropriately.
X-Ref Target - Figure 3-1
ACLK
TVALID
TREADY
TDATA D1 D2 D3 D4
TLAST L1 L2 L3 L4
TUSER U1 U2 U3 U4
NonBlocking Mode
The CORDIC core provides a mode intended to ease the migration from previous, non-AXI
versions of this core. The term “NonBlocking” is used to indicate that lack of data on one
input channel does not cause incoming data on the other channel to be buffered. Also, back
pressure from the output is not possible because in NonBlocking mode the output channel
does not have a tready signal. The full flow control of AXI4-Stream is not always required.
Blocking or NonBlocking behavior is selected using the flow_control parameter or GUI field.
The choice of Blocking or NonBlocking applies to the whole core, not each channel
individually. Channels still have the non-optional tvalid signal, which is analogous to the
New Data (ND) signal on many cores prior to the adoption of AXI4-Stream. Without the
facility to block dataflow, the internal implementation is much simplified, so fewer
resources are required for this mode. This mode is recommended for users migrating their
design to this version from a pre-AXI version with minimal change.
When all of the present input channels receive an active tvalid (and tready, if present, is
asserted), an operation is validated and the output tvalid (suitably delayed by the latency
of the core) is asserted to qualify the result. This is to allow a minimal migration from
previous versions. If one channel receives tvalid and the other does not, an operation
does not occur, even if tready is present and asserted. Unlike Blocking mode (which is fully
AXI4-Stream compliant) valid transactions on an individual channel can be ignored in
NonBlocking mode. For performance, ARESETn is registered internally, which delays its
action by one clock cycle. The effect is that the core is still reset and does not accept input
in the cycle following the deassertion of ARESETn. tvalid is also inactive on the output
channel for this cycle.
Figure 3-2 shows the NonBlocking mode in operation. For simplicity of illustration, the
latency of the core is zero. As indicated by s_axis_cartesian_tready and
s_axis_phase_tready (which are ultimately the same signal), the core can accept data
on every third cycle. Data A1 in the Cartesian channel is ignored because
s_axis_phase_tvalid is deasserted. Data inputs A2 and B1 are accepted because both
tvalids and tready are asserted.
X-Ref Target - Figure 3-2
aclk
s_axis_cartesian_tvalid
s_axis_cartesian_tready
s_axis_cartesian_tdata A1 A2 A3 A4 A5
s_axis_phase_tvalid
s_axis_phase_tready
s_axis_phase_tdata B1 B2 B3
m_axis_dout_tvalid
m_axis_dout_tdata A2;B1 A4;B3
Blocking Mode
The term ‘Blocking’ means that each channel with tready buffers data for use. The full flow
control of AXI4-Stream aids system design because the flow of data is self-regulating.
Blocking or NonBlocking behavior is selected using the flow_control parameter or GUI field.
Data loss is prevented by the presence of back pressure (tready), so that data is only
propagated when the downstream datapath is ready to process the data. The CORDIC core
has one or two input channels and one output channel. When all input channels have
validated data available, an operation occurs and the result becomes available on the
output. If the output is prevented from off-loading data because m_axis_dout_tready
is low, data accumulates in the output buffer internal to the core. When this output buffer
is nearly full the core stops further operations. This prevents the input buffers from
off-loading data for new operations so the input buffers fill as new data is input. When the
input buffers fill, their respective treadys (s_axis_cartesian_tready and
s_axis_phase_tready) are deasserted to prevent further input. This is the normal action
of back pressure. The two input channels are tied, as each must receive validated data
before an operation can proceed. As an additional blocking mechanism, one input channel
does not receive validated data while the other does. In this case, the validated data is
stored in the input buffer of the channel. After a few cycles of this scenario, the buffer of the
channel receiving data fills and tready for that channel is deasserted until the empty
channel receives some data.
Figure 3-3 shows both blocking behavior and back pressure. The first data on channel
S_AXIS_CARTESIAN is paired with the first data on channel S_AXIS_PHASE, the second with
the second, and so on. This demonstrates the ‘blocking’ concept. The channel names
S_AXIS_CARTESIAN and S_AXIS_PHASE are used conceptually. Either can be taken to mean
the Cartesian or phase channel. Figure 3-3 further shows how data output is delayed not
only by latency, but also by the handshake signal m_axis_dout_tready. This is ‘back
pressure’. Sustained back pressure on the output along with data availability on the inputs
eventually leads to a saturation of the core buffers, causing the core to signal that it can no
longer accept further input by deasserting the input channel tready signals. The minimum
latency in this example is two cycles, but it should be noted that in Blocking operation
latency is not a useful concept. Instead, as Figure 3-3 shows, each channel acts as a queue,
ensuring that the first, second, third data samples on each channel are paired with the
corresponding samples on the other channels for each operation.
X-Ref Target - Figure 3-3
aclk
s_axis_cartesian_tvalid
s_axis_cartesian_tready
s_axis_cartesian_tdata A1 A2 A3 A4 A5 A6
s_axis_phase_tvalid
s_axis_phase_tready
s_axis_phase_tdata B1 B2 B3
m_axis_dout_tvalid
m_axis_dout_tready
TDATA Packing
Fields within an AXI4-Stream interface follow a specific nomenclature. In this core the
operands are both passed to or from the core over the tdata port of the channel. To ease
interoperability with byte-oriented protocols, each subfield within tdata that could be
used independently is first extended, if necessary, to fit a bit field which is a multiple of 8
bits. For the output DOUT channel, result fields are sign-extended to the byte boundary.
The bits added by byte orientation are ignored by the core and do not use additional
resources.
PAD PHASE_IN
0
Input_Width
Rotate,
PAD Y_OUT PAD X_OUT Sin_and_Cos,
Sinh_and_Cosh
0
Output_Width
ArcTan,
PAD PHASE_OUT ArcTanh
0
Output_Width
0
Output_Width
TLAST Options
tlast for each input channel is optional. When present, each can be passed through the
CORDIC. When more than one channel has tlast enabled, the core can pass a logical AND
or logical OR of the tlasts input. When no tlasts are present on any input channel, the
output channel does not have tlast either.
TUSER Options
tuser for each input channel is optional. Each has user-selectable width. These fields are
concatenated, without any byte-orientation or padding, to form the output channel tuser
field. The tuser field from the Cartesian channel occupies the least significant position,
followed by the tuser field from the phase channel.
X-Ref Target - Figure 3-7
Functional Description
The CORDIC algorithm was initially designed to perform a vector rotation, where the vector
(X,Y) is rotated through the angle θ yielding a new vector (X’,Y’).
c) θ' = 0
2b) yi + 1 = yi + αi ⋅ xi ⋅ 2 –i
2c) θ i + 1 = θ i + α i ⋅ atan ( 2 –i ) )
See CORDIC Scale Factor or Vector Translation for details on selecting α i . Each
micro-rotation stage can be expressed as a simple shift and add/subtract operation.
Equation 3-3 shows the Vector rotation expression for the nth iteration. Vector rotation
expressed as a series of ‘n’ micro-rotations
n
–i
3a) X' = ∏ cos ( atan ( 2 –i ) ) ( Xi – αi Yi 2 ) Equation 3-3
i=1
n
–i
3b) Y' = ∏ cos ( atan ( 2 –i ) ) ( Yi + αi Xi 2 )
i=1
n
–i
3c) θ' = θ – ( αi ⋅ atan ( 2 ))
i=1
α i = (+ or -) 1.
The CORDIC algorithm can be used to generate either a vector rotation or a vector
translation.
Vector Rotation
Vector rotation rotates the vector (X, Y) through the angle θ to yield a new vector (X’,Y’), as
shown in Figure 3-8.
Vector rotation is performed by selecting α i , such that θ' converges towards zero; that is,
when θ i – 1 >= 0, α i is set to -1 and when θ i – 1 < 0, α i is set +1.
4c) θ' = 0
1
-------------------------------------------
n
Zi =
∏ acos ( atan ( 2 –i ) )
i=1
The input subfields, X_IN, Y_IN and PHASE_IN, are limited to the ranges given in Table 3-1
when coarse rotation is set. Inputs outside these ranges produce unpredictable results. See
Input/Output Data Representation for more information about the CORDIC binary data
formats.
An optional coarse rotation module is provided to extend the range of the input subfields,
X_IN, Y_IN and PHASE_IN, to the full circle. For this functional configuration, the coarse
rotation module is selected by default, but can be manually deselected. See Advanced
Configuration Parameters for more information. When this option is not set, inputs must be
constrained to lie in the first quadrant, -Pi/4 to + Pi/4.
An optional compensation scaling module is provided to compensate for the CORDIC scale
factor Zi. For this functional configuration, the compensation scaling module is selected by
default, but can be manually deselected. See Advanced Configuration Parameters for more
information.
Vector rotation is linear with respect to magnitude; thus the user can scale the input/output
range; that is:
Y
Zi*(X’,Y’)
Output Vector
O
(X’,Y’) (X,Y) Input Vector
The input vector, (Xin, Yin), and the output vector, (Xout, Yout) are expressed as a pair of
fixed-point twos complement numbers with an integer width of 2 bits (1QN format). The
input rotation angle, Pin radians, is also expressed as a fixed-point twos complement
number but with an integer width of 3 bits (2QN format). See the Input/Output Data
Representation section for further information on the CORDIC binary data formats.
In this example, the input/output width is set to 10 bits and the output vector (Xout, Yout)
is scaled to compensate for the CORDIC scale factor.
Vector Translation
Vector translation rotates the vector (X_IN,Y_IN) around the circle until the Y component
equals zero as illustrated in Figure 3-9. The outputs from vector translation are the
magnitude, X’, and phase, θ' , of the input vector (X,Y).
Vector translation is performed by selecting α i such that Y’ converges towards zero; that is,
when Y i-1 >= 0, α i is set to -1 and when Yi-1 < 0, α i is set +1.
5b) Y' = 0
X
5c) θ' = atan --
Y
1
-------------------------------------------
n
Zi =
∏ acos ( atan ( 2 –i ) )
i=1
The inputs, X_IN and Y_IN, are limited to the ranges given in Table 3-2 when coarse rotation
is set. Inputs outside these ranges produce unpredictable results. See Input/Output Data
Representation for more information about CORDIC binary data formats.
An optional coarse rotation module is provided to extend the range of inputs, X_IN and
Y_IN, to the full circle. For this functional configuration, the coarse rotation module is
selected by default, but can be manually deselected. See Advanced Configuration
Parameters for more information. When this option is not set, inputs must be constrained to
lie in the first quadrant, -Pi/4 to + Pi/4.
An optional compensation scaling module is provided to compensate for the CORDIC scale
factor Zi. For this functional configuration, the compensation scaling module is selected by
default, but can be manually deselected. See Advanced Configuration Parameters for more
information.
Vector translation is linear with respect to magnitude, making the input/output range
scalable:
The phase angle of a zero length vector, (0,0), is indeterminate and the output phase angle
generated by the core is unpredictable.
The accuracy of the phase output from the CORDIC vector translation algorithm is limited
by the number of significant magnitude bits of the input vector (X_IN, Y_IN). See
Customizing and Generating the Core for more information.
X-Ref Target - Figure 3-9
Y
Output Phase
(X,Y)
Input Vector
Z i*(Mag,0)
Output Mag
O
X
(Mag,0)
The individual input vector elements, (X_IN, Y_IN), and the output magnitude, X_OUT, are
expressed as fixed-point twos complement numbers with an integer width of 2 bits (1QN
format). The output phase angle, PHASE_OUT radians, is expressed as a fixed-point twos
complement number with an integer width of 3 bits (2QN format).
In this example the input/output width is set to 10 bits and the output X_OUT is scaled to
compensate for the CORDIC scale factor.
The Taylor series expansion of acos (atan (2-i)) is (1 + 2-2i) -1/2. Hence, the constant Z i can be
expressed as
n
Zi = ∏ ( 1 + 2 –2i )1 / 2 Equation 3-7
i=1
The CORDIC scale factor, Zi, is only dependent on the number of iterations, n. Only
functional configurations Rotate, Translate, Rectangular to Polar, and Polar to Rectangular
are affected by the CORDIC scale factor. When these functional configurations are selected,
the CORDIC core provides the option of multiplying by 1 / Z i to cancel out the scaling factor.
See Advanced Configuration Parameters for more information.
OQEIQ is due to the half LSB of quantization noise on the X_IN,Y_IN and PHASE_IN inputs.
In a vector rotation this input quantization noise results in OQEIQ of a half LSB on both the
X_OUT and Y_OUT outputs. In a vector translation this input quantization noise results in
OQEIQ of a half LSB on the X_OUT output; however, OQEIQ on the phase output is
dependent on the ratio (Y_IN/ X_IN). Thus for small X_IN inputs the effect of input
quantization noise on OQEIQ is greatly magnified.
OQEIP is due to the limited precision of internal calculations. In the CORDIC core the default
internal precision is set such that the accumulated OQEIP is less than 1/2 the OQEIQ. The
internal precision can be manually set to (Input_Width + Output_Width +
log2(Output_Width)). This reduces OQEIP to a half LSB (the phase is calculated to full
precision regardless of the magnitude input vector).
The Output Quantization Error, for a CORDIC core with default internal precision, is
dominated by OQEIQ. OQEIQ can only be reduced by increasing the number of significant
magnitude bits in the input vector (X_IN,Y_IN). Increasing the internal precision or zero
padding X_IN and Y_IN inputs only affects OQEIP and has minimal effect on the total output
quantization error.
The effect of input quantization and internal quantization on the CORDIC phase output
quantization error is illustrated in the following examples:
Example 1a: The quantization error in phase output for a small input vector, (Xin_small,
Yin_small).
Example 1b: Quantization error in phase output for a large input vector, (Xin_large, Yin_large).
The input PHASE_IN is limited to the range given in Table 3-3 when coarse rotation is set.
Inputs outside this range produce unpredictable results. See Input/Output Data
Representation for more information about CORDIC binary data formats.
An optional coarse rotation module is provided to extend the range of input angle, θ , to the
full circle. For this functional configuration, the coarse rotation module is selected by
default, but can be manually deselected. See Advanced Configuration Parameters for more
information. When this option is not set, inputs must be constrained to lie in the first
quadrant, -Pi/4 to + Pi/4.
The compensation scaling module is disabled for the Sin and Cos functional configuration
as it is internally pre-scaled to compensate for the CORDIC scale factor.
The input angle, PHASE_IN, is expressed as a fixed-point twos complement number with an
integer width of 3 bits (2QN format). The output vector, (X_OUT, Y_OUT), is expressed as a
pair of fixed-point twos complement numbers with an integer width of 2 bits (1QN format).
The input hyperbolic angle, PHASE_IN, is limited to the range given in Table 3-4. Inputs
outside this range produce unpredictable results. See Input/Output Data Representation for
more information about CORDIC binary data formats.
The coarse rotation module is disabled for the Sinh and Cosh functional configuration, as it
does not apply to hyperbolic transformations. The compensation scaling module is disabled
for the Sinh and Cosh functional configuration, as it is internally pre-scaled to compensate
for the CORDIC hyperbolic scale factor.
The input hyperbolic angle, Pin, is expressed as a fixed-point twos complement number
with an integer width of 3 bits (2QN format). The output vector, (X_OUT, Y_OUT), is
expressed as a pair of fixed-point twos complement numbers with an integer width of 2 bits
(1QN format).
ArcTan
When the ArcTan functional configuration is selected, the input vector (X_IN,Y_IN) is rotated
(using the CORDIC algorithm) until the Y component is zero. This generates the output
angle, Atan(Y_IN/X_IN).
The inputs, X_IN and Y_IN, are limited to the ranges given in Table 3-5 when coarse rotation
is set. Inputs outside these ranges produce unpredictable outputs. See Input/Output Data
Representation for more information about CORDIC binary data formats.
An optional coarse rotation module is provided to extend the range of inputs X_IN and Y_IN
to the full circle. For this functional configuration, the coarse rotation module is selected by
default, but can be manually deselected. See Advanced Configuration Parameters for more
information. When this option is not set, inputs must be constrained to lie in the first
quadrant, -Pi/4 to + Pi/4.
The compensation scaling module is disabled for the ArcTan functional configuration as no
magnitude data is output. The ArcTan of a zero length vector, (0,0), is indeterminate and the
output angle generated by the core is undefined.
The accuracy of the output angle from the CORDIC vector translation algorithm is limited by
the number of significant magnitude bits of the input vector (X_IN, Y_IN). See Output
Quantization Error for more information.
Example 5: ArcTan
The input vector (X_IN, Y_IN) is expressed as a pair of fixed-point twos complement
numbers with an integer width of 2 bits (1QN format). The output angle, Pout radians, is
expressed as a fixed-point twos complement number with an integer width of 3 bits (2QN
format).
ArcTanh
When the ArcTanh functional configuration is selected, the CORDIC algorithm is used to
move the input vector (X_IN,Y_IN) along the hyperbolic curve (Figure 3-11) until the Y
component reaches zero. This generates the hyperbolic “angle,” Atanh(Y_IN/X_IN). The
hyperbolic angle represents the log of the area under the vector (X_IN,Y_IN) and is
unrelated to a trigonometric angle.
The inputs, X_IN and Y_IN, are limited to the ranges given in Table 3-6. Inputs outside these
ranges produce unpredictable outputs. Additionally, Y_IN must be less than or equal to (4/
5 * X_IN) or the CORDIC algorithm does not converge. See Input/Output Data
Representation for more information about CORDIC binary data formats.
The coarse rotation module is disabled for the ArcTanh functional configuration, as it does
not apply to hyperbolic transformations.
The compensation scaling module is disabled for the ArcTanh functional configuration as
no output magnitude data is output.
X-Ref Target - Figure 3-11
X19458-072321
Example 6: ArcTanh
The input vector, (X_IN, Y_IN), is expressed as a pair of fixed-point twos complement
numbers with an integer width of 2 bits (1QN format). The output, Pout, is expressed as a
fixed-point twos complement number with an integer width of 3 bits (2QN format).
Square Root
When the square root functional configuration is selected, a simplified CORDIC algorithm is
used to calculate the positive square root of the input. The input, X_IN, and the output,
X_OUT, are always positive and are both expressed as either unsigned fractions or unsigned
integers. When the data format is set to Unsigned Fraction, X_IN is limited to the range:
0 <= X_IN < +2. When data format is set to Unsigned Integer, X_IN is limited to the range:
0 <= X_IN < 2**Input_Width, and the output width is determined automatically based on
the input width. See Input/Output Data Representation for more information about CORDIC
binary data formats.
The coarse rotation module is disabled because coarse rotation is not required for the
Square Root functional configuration. The compensation scaling module is disabled
because no output compensation is required for the Square Root functional configuration.
Table 3-7: Square Root
Signal Range Description
Unsigned Fraction:
0 ≤ X_IN < +2
X_IN Unsigned Integer: Input X Value
Input_Width
0 ≤ X_IN < 2
Unsigned Fraction:
0 ≤ X_OUT < +2
X_OUT Unsigned Integer: Output Square Root
[ int(Input_Width/2) + 1 ]
0 ≤ X_OUT < 2
The input, X_IN, and output, X_OUT, are expressed as an unsigned fixed-point number with
an integer width of 1 bit.
The input, X_IN, is expressed as an unsigned integer. The output, X_OUT, is expressed as an
unsigned integer. In this example the input width is set to 10 bits so the output width is
automatically set to 6 bits.
For Functional Configurations, Rotate, Translate, Sin, Cos and Atan, the Cartesian operands
and results are represented using fixed-point twos complement numbers with an integer
width of 2 bits. The integer width is fixed regardless of the word width; the remainder of the
bits are used for the fractional portion of the number. Using the Q Numbers Format this
representation is described as 1QN where N = word width - 2. It can also be described as
Fix(N+2)_N using the System Generator Fix format.
Input operands, X_IN and Y_IN, must be in the range: -1 <= input data signal <= 1. Input
data outside this range produces undefined results.
For the Square Root Functional Configuration, the Data Signals, X_IN and X_OUT, are both
represented in either Unsigned Fractional or Unsigned Integer data format.
The input operand, X_IN, must be in the range: 0 <= X_IN < +2 when data format is set to
Unsigned Fraction or in the range 0 <= X_IN < 2**Input_Width when data format is set to
Unsigned Integer.
When Unsigned Fractional data format has been selected the Data Signals are represented
using a unsigned fixed-point number with an integer with of 1 bit. The integer width is fixed
and the remainder of the word is used to represent the fractional portion of the number.
Using the System Generator Fix format this representation is described as UFix(N+1)_N,
where is the number of fractional bits being used and is defined as N = word width -1. The
Q Number format is used to represent signed twos complement numbers and is therefore
not suitable to describe the representation format used by the square root function.
Phase Signals
The s_axis_phase_tdata Phase operand is PHASE_IN. The m_axis_dout_tdata phase
output is called PHASE_OUT. The phase signals are always represented using a fixed-point
twos complement number with an integer width of 3 bits. As with the data signals the
integer width is fixed and any remaining bits are used for the fractional portion of the
number. The Phase Signals require an increased integer width to accommodate the
increased range of values they must represent when the Phase Format is set to Radians.
When Phase Format is set to Radians, PHASE_IN must be in the range: -Pi <= (PHASE_IN)
<= Pi. PHASE_IN outside this range produce undefined results.
When Phase Format is set to Scaled Radians PHASE_IN must be in the range: -1 <=
(PHASE_IN) <= +1. PHASE_IN outside this range produce undefined results.
Q Numbers Format
An XQN format number is an 1+X+N bit twos complement binary number; a sign bit
followed by X integer bits followed by an N bit mantissa (fraction). XQN format can be used
to express numbers in the range (-2 X) to (2 X - 2(-N)). An equivalent notation using the
System Generator Fix format, defined as Fixword_length_fractional_length, would be
Fix(1+X+N)_N.
A number using Q15 format is equivalent to a number using Fix16_15 representation, and a
number in 1Q15 format is equivalent to a number using Fix17_15 representation.
Table 3-8 and Table 3-9 contain examples of XQN Format Numbers.
Table 3-8: 1QN Format Data: Example of a 1Q7 (or Fix9_7) Format Number
(Sign) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 8
+1 0 1 0 0 0 0 0 0 0
-1 1 1 0 0 0 0 0 0 0
+Pi/4 0 0 1 1 0 0 1 0 0
-Pi/4 1 1 0 0 1 1 0 1 1
Fractional Bits
Table 3-9: 2QN Format Phase: Example of a 2Q6 (or Fix9_6) Format Number
(Sign)
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Bit 8
+1 0 0 1 0 0 0 0 0 0
-1 1 1 1 0 0 0 0 0 0
+Pi 0 1 1 0 0 1 0 0 1
-Pi 1 0 0 1 1 0 1 1 1
Fractional Bits
When the input and output width differ, care must be taken to re-interpret the CORDIC
output.
Example 8a
The Vector Translation function determines the magnitude and phase angle of a given input
vector (X_IN, Y_IN). The input and output width is set to 10 bits. The standard CORDIC data
representation is Fix10_8, the alternative format being mapped onto the input of the
CORDIC is Fix10_1.
Table 3-10: Example 8: Mapping an Alternative Data Format onto the X_IN input
Sign Decimal
Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Value
Binary Value 0 0 1 0 1 1 0 1 0 1
Fix10_8 weighting -2 1 20 2 -1 2 -2 2 -3 2 -4 2 -5 2 -6 2 -7 2 -8 0.707
8 7 6 5 4 3 2 1 0 -1
Fix10_1 weighting -2 2 2 2 2 2 2 2 2 2 90.5
Table 3-11: Example 8: Mapping an Alternative Data Format onto the Y_IN input
Sign Decimal
Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Value
Binary Value 0 0 1 0 0 0 0 0 0 0
1 0 -1 -2 -3 -4 -5 -6 -7
Fix10_8 weighting -2 2 2 2 2 2 2 2 2 2 -8 0.25
Fix10_1 weighting -2 8 27 26 25 24 23 22 21 20 2 -1 32
MATLAB® software is used to generate the expected results. Firstly the magnitude and
phase angle for the standard CORDIC input format 1Q8, or Fix10_8 is generated:
>> a=0.707+0.25j
magnitude = 0.7499
phase_angle = 0.3399
>> b=90.5+32j
magnitude = 95.9909
phase_angle = 0.3399
Table 3-12 and Table 3-13 demonstrate the output value of the CORDIC being interpreted
using the two data representation formats.
Example 8b
If the output width is less than the input width, the CORDIC reduces the fractional width of
the result. When the data output, X_OUT, is being re-interpreted to an alternative data
format, the value must be scaled appropriately.
Table 3-14 demonstrates how the resulting decimal value might change when the output
width is reduced to 8 bits.
Table 3-14: Example 8b: X_OUT Interpretation with Reduced Output Width
Sign Decimal
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Value
Binary Value 0 0 1 1 0 0 0 0
Fix8_6 weighting -2 1 20 2 -1 2 -2 2 -3 2 -4 2 -5 2 -6 0.75
7 6 5 4 3 2 1 0
Fix8_0 weighting -2 2 2 2 2 2 2 2 48
A similar situation arises when the output width is greater than the input width. In this case,
the CORDIC increases the fractional width of the result. When the data output is being
re-interpreted to a data format with no fractional bits, this results in an increased
magnitude. This output then needs to be scaled appropriately.
Example 9
Table 3-15: Example 9: Mapping an Alternative Data Format onto the X_IN Input
The expected output values for each input format are as follows:
Table 3-16 demonstrates the output value directly interpreted in each of the input formats.
Table 3-16 shows that if the output value is directly interpreted in the alternative data
format the wrong decimal value is determined. The output value must be scaled correctly.
The CORDIC core calculates the square root of input values in the range 0 <= X_IN < 2.
Y = X Equation 3-8
The alternative data format represents values in the range 0<= X_IN < 2 N+1 and the
requirement is to calculate:
Interpreting Xalt using the standard CORDIC data format scales the input by 2-N, shown in
Table 3-15.
–N
Y = 2 ⋅ X alt
Equation 3-10
( –N ) ⁄ 2
Y = 2 ⋅ X alt
As Table 3-16 shows, directly re-interpreting the CORDIC output in the alternative data
formats results in an incorrect decimal value. This is due to the scale factor introduced by
the remapping of the input and the square root function. This scaling factor introduced is
shown in Equation 3-10, 2-N/2.
When N is even the scaling factor is an integer power of two. This can be applied by right
shifting the CORDIC output, X_OUT, by N/2. The example using the UFix8_1 format
demonstrates this with a scaling factor of 2-3 = 1/8.
When N is odd the scaling factor is not an integer power of two. This introduces an
additional output scaling factor of 2 . The example using UFix8_0 demonstrates this with a
scaling factor of 2-7/2 = 2-3.5.
This could be implemented by first scaling the output by a right shift of 4 and then
multiplying by 2 . A more efficient way would be to translate the 2 scaling to the input of
the square root function.
(– M – 1 ⁄ 2)
Y = 2 ⋅ X alt
Equation 3-11
–M –1
Y = 2 ⋅ 2 ⋅ X alt
The scaling becomes a simple divide by 2, or right shift, of the input, X_IN, before applying
it to the square root function. Followed by scaling the output, X_OUT, by 2 -M.
An input value of 8 is used for the UFix8_0 formatting example. Divided by 2 this gives 4.
Table 3-15 shows that 4 maps to 1/32 in the CORDIC input range.
1 ⁄ 32 = 0.17678 = 0.0010110
Table 3-16 shows that the CORDIC output value, 0.0010110, maps to a decimal value of 22
in UFix8_0 formatting. Applying the output scaling of 2-3, or 1/8, gives 2.75. The loss in
accuracy is due to representing 1 ⁄ 32 using only 8 bits. If the full accuracy result is used
and then re-interpreted to the alternative data format (Fix8_0) and then scaled, the correct
result is obtained; for example:
7 –3
1 ⁄ 32 × 2 × 2 = 2.8284
• Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994)
[Ref 5]
• Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6]
• Vivado Design Suite User Guide: Getting Started (UG910) [Ref 7]
• Vivado Design Suite User Guide: Logic Simulation (UG900) [Ref 8]
If you are customizing and generating the core in the Vivado IP integrator, see the Vivado
Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994) [Ref 5] for
detailed information. IP integrator might auto-compute certain configuration values when
validating or generating the design. To view the parameter value you can run the
validate_bd_design command in the Tcl Console.
You can customize the IP for use in your design by specifying values for the various
parameters associated with the IP core using the following steps:
For details, see the Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6] and
the Vivado Design Suite User Guide: Getting Started (UG910) [Ref 7].
The CORDIC GUI in the Vivado IDE contains two information tabs and two pages to
configure the core.
The Implementation Details tab displays the core latency and resource usage. The block
RAM and Multiplier/DSP Slice resources are only utilized when Compensation Scaling is
selected.
Component Name: Used as the base name of the output files generated for the core.
Names must begin with a letter and be composed from the following characters: a to z, 0 to
9, and “_.”
• Functional Selection: The functional selections available are Rotate, Sin and Cos,
ArcTan, Square Root, Translate, Sinh and Cosh and ArcTanh. See Functional Description
for more information on each of the supported functions. In general, X_IN, Y_IN, X_OUT
and Y_OUT express signed binary numbers of 1QN format and PHASE_IN and
PHASE_OUT express signed binary numbers of 2QN format. When Square Root is
selected, two new data formats are available: Unsigned Integer and Unsigned Fraction.
For details about CORDIC binary data formats, see Input/Output Data Representation.
• Architectural Configuration: Two architectural configurations are available for the
CORDIC core, Parallel and Word Serial. See Performance for more details.
• Pipelining Mode: The CORDIC core provides three pipelining modes: None, Optimal,
and Maximum. The choice of pipelining mode is based on the selection of Functional
Configuration and Architectural Configuration. Unavailable pipelining modes are
greyed out in the CORDIC GUI.
° Maximum: CORDIC core is implemented with a pipeline after every shift-add sub
stage.
• Data Format: CORDIC core provides three formats for expressing the X and Y
components of data samples:
° Signed Fraction: Default setting. The X and Y inputs and outputs are expressed as
fixed-point twos complement numbers with an integer width of 2 bits. Example:
11100000 represents the value -0.5.
° Unsigned Fraction: The X and Y inputs and outputs are expressed as unsigned
fixed-point number with an integer with of 1 bit.
Available only for Square Root functional configuration. Example: 11100000
represents the value +1.75.
° Unsigned Integer: The X and Y inputs and outputs express unsigned integers.
Available only for Square Root functional configuration. Example: 11100000
represents the value +224.
• Phase Format: CORDIC core provides two Phase Format options:
See Input/Output Data Representation for more information about CORDIC binary data
formats.
° Input Width: Input Width controls the widths of the input ports, X_IN, Y_IN and
PHASE_IN. The Input Width can be configured in the range 8 to 48 bits.
° Register Inputs: Selects if the input signals X_IN, Y_IN, PHASE_IN are registered.
° Output Width: Output Width controls the widths of the output ports, X_OUT,
Y_OUT, PHASE_OUT. The Output Width can be configured in the range 8 to 48 bits.
° Register Outputs: Selects if the output signals, X_OUT, Y_OUT, PHASE_OUT are
registered.
• Round Mode: The CORDIC core provides four rounding modes. Table 4-1 illustrates the
behavior of the different Rounding modes.
° Positive Infinity: The X_OUT, Y_OUT, and PHASE_OUT outputs are rounded such
that 1/2 is rounded up (towards positive infinity). It is equivalent to the MATLAB®
function floor(x + 0.5).
° Pos Neg Infinity: The outputs X_OUT, Y_OUT, and PHASE_OUT are rounded such
that 1/2 is rounded up (towards positive infinity) and -1/2 is rounded down
(towards negative infinity). It is equivalent to the MATLAB function round(x).
° Nearest Even: The X_OUT, Y_OUT, and PHASE_OUT outputs are rounded toward the
nearest even number such that a 1/2 is rounded down and 3/2 is rounded up.
quadrant and inverse rotating the output sample back into the appropriate
quadrant.
• Output has TREADY: Selects optional port m_axis_dout_tready. With this option,
the core might be stalled by backpressure and so needs an output buffer (internally).
Without this option, the core might not be stalled and does not require an output
buffer which results in a smaller design.
• Output TLAST Behavior: Selects the logic combination of input tlasts to become
m_axis_dout_tlast. When neither input tlast is selected this is forced to Null and
m_axis_dout_tlast is not present. When only one is selected,
m_axis_dout_tlast exists and outputs the delayed input tlast. When both input
tlasts are selected, the output, suitably delayed can be selected as either input, or a
logical OR of the inputs, or a logical AND of the inputs.
Optional Pins
• ACLKEN: Selects optional port ACLKEN. This is provided primarily for ease of migration.
It is not recommended when designing with AXI4-Stream Blocking modes.
• ARESETn: Selects optional port ARESETn. ARESETn is active-Low and must be asserted
for a minimum of two aclk cycles to reset the core.
User Parameters
Table 4-2 shows the relationship between the fields in the Vivado IDE (described in
Customizing and Generating the Core) and the User Parameters (which can be viewed in the
Tcl Console).
Output Generation
For details, see the Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 6].
Implementation
See the System Generator for DSP User Guide (UG640) [Ref 9] for information about the
FPGA Area Estimation parameter.
Required Constraints
This section is not applicable for this IP core.
Clock Frequencies
This section is not applicable for this IP core.
Clock Management
This section is not applicable for this IP core.
Clock Placement
This section is not applicable for this IP core.
Banking
This section is not applicable for this IP core.
Transceiver Placement
This section is not applicable for this IP core.
Simulation
For comprehensive information about Vivado® simulation components, as well as
information about using supported third-party tools, see the Vivado Design Suite User
Guide: Logic Simulation (UG900) [Ref 8].
To simulate the core, generate the core simulation model and demonstration test bench.
Ensure that the demonstration test bench is the top-level entity in the simulation options.
IMPORTANT: For cores targeting 7 series or Zynq-7000 devices, UNIFAST libraries are not supported.
Xilinx IP is tested and qualified with UNISIM libraries only.
C Model
The CORDIC core bit accurate C model is a self-contained, linkable, shared library that
models the functionality of this core with finite precision arithmetic. This model provides a
bit accurate representation of the various modes of the CORDIC core, and it is suitable for
inclusion in a larger framework for system-level simulation or core-specific verification.
Features
• Bit accurate with CORDIC core
• Available for 64-bit Linux platforms
• Available for 64-bit Windows platforms
• Supports all features of the CORDIC core with the exception of those affecting timing
or AXI4-Stream configuration
• Designed for integration into a larger system model
• Example C code showing how to use the C model functions
Overview
The model consists of a set of C functions that reside in a shared library. Example C code is
provided to demonstrate how these functions form the interface to the C model. Full details
of this interface are given in C Model Interface.
The model is bit accurate but not cycle-accurate; it performs exactly the same operations as
the core. However, it does not model the core latency, interface signals or TUSER feature.
Table 5-1 and Table 5-2 list the contents of each ZIP file.
Installation
Installation instructions for Linux and Windows operating systems are described in this
section.
Linux
• Unpack the contents of the ZIP file.
• Ensure that the directory where the libIP_cordic_v6_0_bitacc_smodel.so
resides is included in the path of the environment variable LD_LIBRARY_PATH.
Windows
• Unpack the contents of the ZIP file.
• Ensure that the directory where the libIP_cordic_v6_0_bitacc_cmodel.dll
resides is:
° Included in the path of the environment variable PATH, or
° In the directory in which the executable that calls the C model is run.
C Model Interface
An example file, run_bitacc_cmodel.c, is included. This demonstrates how to call the C
model. See this file for examples of using the interface described in this section.
The Application Programming Interface (API) of the C model is defined in the header file
cordic_v6_0_bitacc_cmodel.h. The interface consists of data structures and
functions as described in the following sections.
Data Types
The C types defined for the CORDIC C model are listed in Table 5-3.
The xip_array_complex and xip_array_real types are structures with the following members:
• data_capacity: Also of type size_t, which describes how much of the array is currently
• populated.
• dim: A pointer to a size_t array of values which indicate the size of each dimension.
• dim_size (size_t): Indicates the number of dimensions of the data array.
• dim_capacity: Indicates how much of the dimension array is currently populated.
• owner: This unsigned int member is provided as a handle for when the data structure is
intended to be passed from one core to another, but is not used by any of the CORDIC
C model functions.
Data Values
The CORDIC core input and output fields are in standard twos complement binary form
with widths between 8 and 48 bits.
The CORDIC C model expects data to be in the C type double, equal to the raw value of the
twos complement bit vector input to the HDL. The parameters, DataFormat and
PhaseFormat determine how the value is interpreted by the C model just as the equivalent
parameters used to configure the HDL core determine how the HDL core interprets input
binary vectors.
For example, the 8 bit vector 11110000 input to the core should be input to the C model as
-16, regardless of the value of parameters for data format or phase format.
Functions
There are several accessible C model functions.
Information Functions
Table 5-4 lists the information functions. The prototypes for these functions can be found in
the C model header file.
Initialization Functions
The functions to create, configure and destroy the C model and associated data structures
are listed in Table 5-5.
Notes:
1. #TYPE# can be real or complex.
Execution Functions
The run time functions of the C model are described in Table 5-6.
Notes:
1. #TYPE# can be real or complex.
Compiling
Compilation of user code requires access to the cordic_v6_0_bitacc_cmodel.h
header file and the header files of the MPIR dependent libraries, gmp.h. The header files
should be copied to a location where they are available to the compiler. Depending on the
location chosen, the include search path of the compiler might need to be modified.
Linking
To use the C model the user executable must be linked against the correct libraries for the
target platform.
Note: The C model uses MPIR libraries. It is also possible to use GMP or MPIR libraries from other
sources, for example, compiled from source code. For details, see Dependent Libraries.
Linux
The executable must be linked against the following shared object libraries:
• libgmp.so.11
• libIp_cordic_v6_0_bitacc_cmodel.so
Using GCC, linking is typically achieved by adding the following command line options:
This assumes the shared object libraries are in the current directory. If this is not the case,
the -L. option should be changed to specify the library search path to use.
Using GCC, the provided example program run_bitacc_cmodel.c can be compiled and
linked using the following command:
Windows
The executable must be linked against the following dynamic link libraries:
• libgmp.dll
• libIp_cordic_v6_0_bitacc_cmodel.dll
Depending on the compiler, the import libraries might also be required:
• libgmp.lib
• libIp_cordic_v6_0_bitacc_cmodel.lib
Using Microsoft Visual Studio, linking is typically achieved by adding the import libraries to
the Additional Dependencies entry under the Linker section of Project Properties.
Dependent Libraries
The C model uses the MPIR library. This is governed by the GNU Lesser General Public
License. You can obtain source code for the MPIR library from https://www.xilinx.com/
products/design-tools/guest-resources.html. A pre-compiled MPIR library is provided with
the C model, using the following version:
• MPIR 2.6.0
As MPIR is a compatible alternative to GMP, the GMP library can be used in place of MPIR.
It is possible to use GMP or MPIR libraries from other sources, for example, compiled from
source code.
GMP and MPIR in particular contain many low level optimizations for specific processors.
The libraries provided are compiled for a generic processor on each platform, using no
optimized processor-specific code. These libraries work on any processor, but run more
slowly than libraries compiled to use optimized processor-specific code. For the fastest
performance, compile libraries from source on the machine on which you run the
executables.
Source code and compilation scripts are provided for the version of MPIR that was used to
compile the provided libraries. Source code and compilation scripts for any version of the
libraries can be obtained from the GMP [Ref 10] and MPIR [Ref 11] websites.
Note: If compiling MPIR using its configure script (for example, on Linux platforms), use the
--enable-gmpcompat option when running the configure script. This generates a libgmp.so
library and a gmp.h header file that provide full compatibility with the GMP library.
Example
The run_bitacc_cmodel.c file contains example code to show basic operation of the C
model. The comments assist in understanding the code.
Test Bench
This chapter contains information about the test bench provided in the Vivado® Design
Suite.
The demonstration test bench source code is one VHDL file: demo_tb/
tb_<component_name>.vhd in the Vivado output directory. The source code is
comprehensively commented.
The demonstration test bench drives the input signals of the core to demonstrate the
features and modes of operation of the core. The CORDIC core is driven with two simple
data sets (phasors of different periods) to stimulate the core with a wide range of positive
and negative values, including zero. The input data is pre-generated and stored in data
tables, and the test bench drives the core data inputs with the ramp data throughout the
operation of the test bench.
The demonstration test bench drives the AXI handshaking signals in different ways, split
into three phases. The operations depend on whether Blocking Mode or NonBlocking Mode
is selected:
• Blocking Mode:
° Phase 1: full throughput, all tvalid and tready signals are tied High
° Phase 1: full throughput, all tvalid and tready signals are tied High
All operations performed by the demonstration test bench to drive the inputs of the core
are done in the stimuli process. This process is comprehensively commented, to explain
clearly what is being done. New input data or different ways of driving AXI handshaking
signals can be added by modifying sections of this process. The total run time of the test
can be modified by changing the TEST_CYCLES constant: this controls the number of clock
cycles before the simulation is stopped. The clock frequency of the core can be modified by
changing the CLOCK_PERIOD constant.
Upgrading
This appendix contains information about migrating a design from the ISE® Design Suite to
the Vivado® Design Suite, and for upgrading to a more recent version of the IP core. For
customers upgrading in the Vivado Design Suite, important details (where applicable)
about any port changes and other impact to user logic are included.
The Vivado Design Suite core upgrade functionality can be used to upgrade an existing
XCO/XCI file from v4.0 or v5.0 to CORDIC v6.0. See Instructions for Minimum Change
Migration (v4.0 to v6.0). There are no changes of functionality, port or configuration from
v5.0 to v6.0.
Parameter Changes
Table A-1 shows the parameter changes from version 4.0 to version 6.0.
Port Changes
Table A-2: Port Changes from Version v4.0 to v6.0
Version 4.0 Version 6.0 Notes
CLK aclk Rename only
CE ACLKEN Rename only
Rename and change of sense (now active-Low). Note
SCLR ARESETn that ARESETn should be asserted for a minimum of 2
cycles.
Deprecated. However, this is analogous to the tvalid
ND signals. See Instructions for Minimum Change Migration
(v4.0 to v6.0).
Deprecated. However, this is analogous to the tready
RFD signals. See Instructions for Minimum Change Migration
(v4.0 to v6.0).
Deprecated. However, this is analogous to the
RDY m_axis_dout_tvalid. See Instructions for Minimum
Change Migration (v4.0 to v6.0).
X_IN s_axis_cartesian_tdata subfield subfield of s_axis_cartesian_tdata See TDATA Packing.
Y_IN s_axis_cartesian_tdata subfield subfield of s_axis_cartesian_tdata. See TDATA Packing.
PHASE_IN s_axis_phase_tdata subfield s_axis_phase_tdata(N-1:0)
X_OUT m_axis_dout_tdata subfield Subfield of m_axis_dout_tdata. See TDATA Packing.
Y_OUT m_axis_dout_tdata subfield Subfield of m_axis_dout_tdata. See TDATA Packing.
PHASE_OUT m_axis_dout_tdata subfield Subfield of m_axis_dout_tdata. See TDATA Packing.
Latency Changes
With the addition of AXI4-Stream interfaces, the latency of the CORDIC core v6.0 is different
compared to v4.0 for AXI Blocking mode. Latency is the same as v4.0 in v6.0 for AXI
NonBlocking mode. Importantly, when in Blocking Mode, the latency of the core is variable
due to the FIFO nature of the AXI4-Stream protocol, so only the minimum possible latency
can be determined. Relative to v4.0, with Blocking and Output tready present, minimum
latency is 3 cycles greater. With no output tready, minimum latency is increased by one
cycle only. There are no latency changes from v5.0 to v6.0.
Parameters
• Set FlowControl to NonBlocking.
Ports
• Rename and map signals as detailed in Port Changes.
• Map ND to both s_axis_cartesian_tvalid and s_axis_phase_tvalid, if
present for the function in question.
• Map RFD to s_axis_cartesian_tready or s_axis_phase_tready.
• Map RDY to m_axis_dout_tvalid.
Performance and resource use is unchanged compared with CORDIC v4.0 and v5.0 other
than small changes due to the use of different tools
Functionality Changes
There are no functionality changes in v6.0 compared to v5.0. The addition of AXI4-Stream
interfaces in v5.0 causes functionality changes compared to v4.0. See Instructions for
Minimum Change Migration (v4.0 to v6.0).
Simulation Changes
Starting with CORDIC v6.0 (2013.3 version) behavioral simulation models have been
replaced with IEEE Encrypted VHDL. The resulting model is bit and cycle accurate with the
final netlist. For more information on simulation see the Vivado Design Suite User Guide:
Logic Simulation (UG900) [Ref 8].
Debugging
This appendix includes details about resources available on the Xilinx Support website and
debugging tools.
Documentation
This product guide is the main document associated with the CORDIC core. This guide,
along with documentation related to all products that aid in the design process, can be
found on the Xilinx Support web page or by using the Xilinx Documentation Navigator.
Download the Xilinx Documentation Navigator from the Downloads page. For more
information about this tool and the features available, open the online help after
installation.
Answer Records
Answer Records include information about commonly encountered problems, helpful
information on how to resolve these problems, and any known issues with a Xilinx product.
Answer Records are created and maintained daily ensuring that users have access to the
most accurate information available.
Answer Records for this core can be located by using the Search Support box on the main
Xilinx support web page. To maximize your search results, use keywords such as:
• Product name
• Tool message(s)
• Summary of the issue encountered
A filter search is available after results are returned to further target the results.
Technical Support
Xilinx provides technical support at the Xilinx Support web page for this LogiCORE™ IP
product when used as described in the product documentation. Xilinx cannot guarantee
timing, functionality, or support if you do any of the following:
• Implement the solution in devices that are not defined in the documentation.
• Customize the solution beyond that allowed in the product documentation.
• Change any section of the design labeled DO NOT MODIFY.
To contact Xilinx Technical Support, navigate to the Xilinx Support web page.
Debug Tools
There are many tools available to address CORDIC design issues. It is important to know
which tools are useful for debugging various situations.
The Vivado logic analyzer is used with the logic debug IP cores, including:
See the Vivado Design Suite User Guide: Programming and Debugging (UG908) [Ref 13].
Reference Boards
Various Xilinx development boards support the CORDIC core. These boards can be used to
prototype designs and establish that the core can communicate with the system.
° KC705
° KC724
C Model Reference
See Chapter 5, C Model in this guide for tips and instructions for using the provided C
Model files to debug your design.
Third-Party Tools
MATLAB® can be used to debug this core.
Simulation Debug
The simulation debug flow for Mentor Graphics Questa Advanced Simulator is shown in
Figure B-1. A similar approach can be used with other simulators.
Questa Advanced
Simulator Simulation
Debug
Yes
Do you get errors referring to Yes Need to compile and map the
failing to access library? proper libraries.
No
No
X19457-062217
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see Xilinx
Support.
• From the Vivado® IDE, select Help > Documentation and Tutorials.
• On Windows, select Start > All Programs > Xilinx Design Tools > DocNav.
• At the Linux command prompt, enter docnav.
Xilinx Design Hubs provide links to documentation organized by design tasks and other
topics, which you can use to learn key concepts and address frequently asked questions. To
access the Design Hubs:
• In the Xilinx Documentation Navigator, click the Design Hubs View tab.
• On the Xilinx website, see the Design Hubs page.
Note: For more information on Documentation Navigator, see the Documentation Navigator page
on the Xilinx website.
References
These documents provide supplemental material useful with this product guide:
1. Volder, J., The CORDIC Trigonometric Computing Technique IRE Trans. Electronic
Computing, Vol. EC-8, Sept. 1959, pp330-334.
2. Walther, J.S., A Unified Algorithm for Elementary Functions, Spring Joint computer conf.,
1971, proc., pp379-385.
3. Arm® AMBA® AXI4-Stream Protocol Specification (ARM IHI 0051A)
4. Vivado Design Suite AXI Reference Guide (UG1037)
5. Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994)
6. Vivado Design Suite User Guide: Designing with IP (UG896)
7. Vivado Design Suite User Guide: Getting Started (UG910)
8. Vivado Design Suite User Guide: Logic Simulation (UG900)
9. System Generator for DSP User Guide (UG640)
10. The GNU Multiple Precision Arithmetic (GMP) Library (gmplib.org)
11. The GNU Multiple Precision Integers and Rationals (MPIR) library (www.mpir.org)
12. ISE to Vivado Design Suite Migration Guide (UG911)
13. Vivado Design Suite User Guide: Programming and Debugging (UG908)
14. MPIR: Multiple Precision Integers and Rationals: (https://mpir.org/index.html)
Revision History
The following table shows the revision history for this document.