P S ECE 645: C: .: Roject Pecification Omputer Arithemetic Implementaiton in Hardware and Software
P S ECE 645: C: .: Roject Pecification Omputer Arithemetic Implementaiton in Hardware and Software
Submitted by,
HIREN SHAH (GWU)
GAURAV DOSHI (GWU)
INTRODUCTION:
All of the trigonometric functions can be computed or derived from functions using
vector rotations. The CORDIC algorithm provides an iterative method of performing
vector rotations by arbitrary angles using only shifts and adds. The algorithm is derived
from the general rotation transform:
x’ = xcosф – ysinф
y’ = ycosф + xsinф
x’ = cosф [x – ytanф]
y’ = cosф [y + xtanф]
If the rotation angles are restricted so that tanф = ±2i , the multiplication by the tangent
term is reduced to simple shift operation. Arbitrary angles of rotation are obtainable by
performing a series of successively smaller elementary rotations. If the decision at each
iteration i, is which direction to rotate rather than whether or not to rotate, then the cosδ
term. The iterative rotation can now be expressed as:
where:
Ki =cos(tan-12-i) = 1/sqroot(1+2-i)
Di = ±1
Removing the scale constant from the iterative equations yields a shift-add algorithm for
vector rotation. The product of the Ki can be applied elsewhere in the system or trated as
part of a system processing gain. That product approaches 0.6073 as the number of
iterations goes to infinity. Therefore, the rotation algorithm has a gain, An, of
approximately 1.647. The exact gain depends on the number of iterations, and obeys the
relation.
An = П sqroot(1+2-i)
The angle of composite rotation is uniquely defined by the sequence of the directions of
the elementary rotations. That sequence can be represented by a decision vector. The set
of all possible decision vectors is an angular measurement system based on binary
arctangents. Conversions between this angular system and any other can be accomplished
using a look-up. A better conversion method uses an additional adder-subtractor that
accumulates the elementary rotation angles at each iteration. The elementary angles can
be expressed in any convenient angular unit. Those angular values are supplied by a
small lookup table. The angle accumulator adds a third difference equation to the
CORDIC algorithm:
zi+1 = zi – ditan-1(2-i)
In rotation mode, the angle accumulator is initialized with the desired rotation angle. The
rotation decision at each iteration is made to diminish the magnitude of the residual angle
in the angle accumulator. The decision at each iteration is therefore based on the sign of
the residual angle after each step. If the input angle is already expressed in the binary
arctangent base, the angle accumulator may be eliminated. For rotation mode, the
CORDIC equations are:
xi+1 = xi – yidi2-i
yi+1 = yi + xidi2-i
zi+1 = zi – ditan-1(2-i)
The rotational mode CORDIC operation can simultaneously compute the sine and cosine
of the input angle. Setting the y component of the input vector to zero reduces the
rotation mode result to:
xn = An x0 cosZ0
yn = An x0 sinZ0
By setting x0 equal to a/ An , the rotation produces the unscaled sine and cosine of the
angle argument, Z0. The sine and cosine values modulate a magnitude value. Using other
techniques requires a pair of multipliers to obtain the modulation. The CORDIC
technique performs the multiply as part of the rotation operation, and therefore eliminates
the need for a pair of explicit multipliers. The output of the CORDIC rotator is scaled by
the rotator gain. If the gain is not acceptable, a single multiply by the reciprocal of the
gain constant placed before the CORDIC rotator will yield unscaled results. The
hardware complexity of the CORDIC rotator is approximately equivalent to that of a
single multiplier with the same word size.
CORDIC HARDWARE:
It requires three registers for x, y and z, a lookup table to store the values of tan-1(2-i)
And two shifters to supply the terms 2-i x and 2-i y to the adder/subtractor units. The di
factor is accommodated by selecting the operand or its complement.
X
±
shift
Y
±
Z
±
Lookup
Table
Single adder and one shifter can be shared by the three computations if a reduction in
speed by a factor of about 3 is acceptable. In the extreme, CORDIC iterations can be
implemented in firmware or even software using the ALU and general-purpose registers
of a standard microprocessor. Look table can be stored in the control ROM or in main
memory.
APPLICATION:
CORDIC algorithm is powerful tool in the DSP toolbox. This algorithm is used in DSP
designs and DSP engines.
Real time application of CORDIC sine/cosine in satellite data processing systems are
attitude determination and direct digital synthesis.
Direct digital synthesis (DDS) generates a new frequency based upon an original
reference frequency. Virtually all DDS architectures include a lookup table that performs
a sine computation function for generating sinusoidal output signals.
OPTIMIZATION CRITERIA:
IO PORTS:
The whole system is synthesized for Xilinx virtex3 family of FPGAs and 90nm TSMC
library based standard-cell ASICs.
Tools:
1. Cadence – Simvision
2. Synopsys Design Analyzer, DFT, Prime Time (for STA)
3. Active-HDL 7.1(Functional simulation),
4. Synplicity Synplify Pro(synthesis),
5. Xilinx ISE 8.x (Implementation, placement and routing) and
REFERENCES: