cordic presentation
TRANSCRIPT
CORDIC-based Numerically Controlled Oscillator (NCO)Jie Qin, Charles Stroud, Foster Dai Auburn University
Outline
Overview of traditional NCO Introduction to traditional CORDIC Hybrid CORDIC with partial dynamic rotation and LUT Experimental Results
Direct Digital Synthesisf clk
FCWAdder
WN
Registers
M
P
Sin/Cos LUT
N
D
Linear DAC
f out FCW 2N
f out = f clk
A complete DDS consists of NCO, DAC and LPF NCO1 Transform the linear phase word into a digital sin/cos word M: bit-width of phase address to LUT N: bit-width of the DACNCO: numerically controlled oscillator
Performance Merits of DDS and NCO
Signal-to-noise ratio (SNR): Ratio between the signal powerand noise power over (0, fs/2) excluding spurs between the signal power and noise power over (0, fs/2) including spurs power and the worst spur
Signal-to-noise and distortion ratio (SINAD): Ratio
Spur-free dynamic range (SFDR): Ratio between the signal
SNR of NCOM: bit-width of the phase address to LUT N: bit-width of the DAC
NCO performance depends on both M and NTo fully utilize the dynamic range of the DAC, M > N LUT size increases exponentially as N increases
Introduction of CORDICWhat is CORDIC?An acronym for COordinate Rotation DIgital Computer
What can CORDIC do?Calculate sine, cosine, magnitude, and phaseusing only LUT, shift and addition/subtraction operations
How does CORDIC calculate these functions?Through successive vector rotations basically
Potential Applications in BISTNCO (Numerically Controlled Oscillator) BIST Calculation (square root and arctangent)
View Point of VectorTwo forms to represent a vectorPolar form: Aej Cartesian form: (a, b) = a + b j = Acos + j Asin Cartesian forms are used in CORDIC Knowing , needs cos + j sin Can be obtained by rotating a unit vector (1, 0) by
NCO: polar form to Cartesian form
BIST calculation: Cartesian from to polar formKnowing DC1 + j DC2, needs A and Can be obtained by rotating the vector back to x-axis
Illustration of Successive RotationAchieve 65 through a series of rotationsThe phase step i every rotation takes is given that tan i =2-i The rotation starts from 0 whose cosine and sine are 1 and 0Phase 45 26.565 14.026 7.125 3.576 1.790 0.895 0.448 0.224 Tangent 1 1/8 1/16 1/32 1/64 1/128 1/256
Accumulative Phase: =57.539+7.125=64.66465 < 65
How CORDIC Performs RotationRotating a vector eji by i givesej(i +i ) = cos(i + i ) + j sin(i + i ) = (cos i cos i sin i sin i ) + j(sin i cos i + cos i sin i ) = cos i [(cos i tan i sin i ) + j(sin i + tan i cos i )]ej(+i ) = cos i [(cos 2i sin ) + j(sin + 2i cos )]Scaling factor KBit-shift and Subtraction Bit-shift and Adder
Rotations of i are purposely chosen that tani = 2-i
CORDIC algorithm only utilizes CORDIC rotationScaling factor K is discarded, thus Vector (1, 0), after N rotations, becomes Not a problem as long as N is same
CORDIC Rotation
CORDIC Rotation StageRotation Direction control MUX Calculates the accumulative phase accumulative phase after this stage
accumulative phase until this stage
Tells the direction of rotation
Adder for CORDIC Rotation
Bit-Shift for CORDIC Rotation
Rotation Direction control MUX
Pros and Cons of CORDICPros of CORDICNo cos/sin ROM needed Only a small phase LUT, shifts and adders needed
Cons of CORDICA number of rotations requiredLow speed if the rotation stage is reused Heavily Pipelined design for high-speed requirement
Two solutions are proposed to reduce # of rotationsPartial dynamic rotation (PDR) Hybrid architecture to incorporate LUT and CORDIC rotation
Phase Oscillation in CORDIC RotationDifferent between the accumulative phase and the desired phase versus number of total phase rotationsDesired phase: 27.7
Phase Oscillation makes slow phase convergenceRotation step is fixed in each stage Dynamic rotation is needed for fast phase convergenceFind the optimistic (closest) rotation step on-the-fly
Issues with Dynamic RotationScaling factor issue for dynamic rotationej(+i ) = cos i [(cos 2i sin ) + j(sin + 2i cos )]Scaling factor KBit-shift and Subtraction Bit-shift and Adder
CORDIC Rotation
K is ignored to eliminate the needs for multipliersNot a problem for static CORDIC rotationsince all i in LUT will be gone through
Serious issue for dynamic rotationNo constant amplitude for output vectors
Issue of hardware overheadDynamic rotation selection and programmable shifter requiredMore hardware overhead than static rotation stage
Partial Dynamic RotationPartially Dynamic Rotation (PDR)If i small enough, no scaling factor issue since cosi 1.Static rotation for large i Only dynamic rotation for small iPhase 45 26.565 14.026 7.125 3.576 1.790 1.790 0.895 0.448 0.224 Tangent 1 1/8 1/16 1/32 1/64 1/128 1/256 Cosine 0.7071 0.8944 0.9701 0.9923 0.9981 0.9995 0.9999 1 1
Speed up the phase convergence
It is safe to use PDR from 3.576 for a 12-bit NCO
Hybrid Structure(M1, N2)9 and 8 11 and 10 13 and 12
Hardware Resource# of 4-input LUTs # of DFFs # of 4-input LUTs # of DFFs # of 4-input LUTs # of DFFs
LUT142 0 508 0 1534 0
Static CORDIC314 318 448 451 590 598
PDR CORDIC337 228 464 307 578 466
LUT is much more efficient when N is smallLUT and PDR are combined to achieve the best result
It is hard to synthesize a LUT with wide address bus1. 2.
M: bit-width of the phase address to LUT N: bit-width of the DAC
Pros of Dynamic RotationConverge faster, thus less # of rotations required Natural dithering effect in phase domainThus clean spectrum
FCW=8193
CORDIC Dynamic Rotation StagePicks the rotation step dynamically
Determines a phase index for phase LUT and bit-shifter
Programmable Bit-shifter
Architecture of PDR-CORDIC
WCORDIC_ATO (without -) CORDIC_DTO BTM (Two NCOs) 32 32 32
M9 6
P8 9
Q13 15
N15 12
# of Static Stages0 0
# of PDR Stages2 2
RC Synthesized Area (um2)28,203+52,423 15,767+24,010 26,231+49,621
SINAD vs. FCW
CORDIC for DTOWorst SINADAbout 63.5dB
CORDIC for ATOWorst SINADAbout 73.4dB
SFDR vs. FCW
CORDIC for DTOWorst SFDRAbout 66dB
CORDIC for ATOWorst SFDRAbout 78dB
Worst-Case SFDR
fs/2
2nd Worst-Case SFDR
fs/4
Architecture of PDR-CORDIC with -
- is adopted to further randomize the phase residueFor better spectrum performance
2nd Worst-Case SFDR after
ConclusionHybrid CORDIC with PDR and LUT is a very strong candidate for implementing high speed and high-resolution NCOMuch faster convergence speed than traditional CORDIC Less area overhead than traditional CORDICComparable to BTM ROM compression technique
Quiet Spectrum