You are on page 1of 19

FPGA IMPLEMENTATION OF

CORDIC ALGORITHM BASED


CALCULATOR
BY: MOHIT NARWAL
14001516005
UNDER SUPERVISION OF
MR VIKAS NEHRA
(ASSISTANT PROFESSOR)
INTRODUCTION

• CORDIC ( COordinate Rotation Digital Computer).


• Introduced in 1959 by Jack E. Volder.
• Efficient to compute sin, cos, tan, hyperbolic , logarithmic etc.
• Its an Hardware Efficient Algorithm.
• Iterative Algorithm for Circular Rotation.
• No Multiplication.
• Delay/Hardware cost comparable to division or square rooting.
WHY CORDIC ?
• How to evaluate trigonometric functions?
• Table lookup
• Polynomial approximations
• CORDIC
• Compared to other approaches, CORDIC is a clear winner when :
• Hardware Multiplier is unavailable ( eg microcontroller)
• You want to save the gates required to implement(eg in FPGA)
 Functions such as sin, cos, tan, … appear in many
problems
 Signal processors
 Transforms, Filters, ... for end applications such as Radar,

 Robotics
 Motion prediction, environment geometry calcn, ...
 Linear systems
 Control, …

 Cordic algorithm was used replace analog computers in


B – 58 bombers.
FINAL EQUATIONS

xn = An ( x0 cos z0 - y0 sin z0 )
xi+1 = xi - yi di 2-i
yn = An ( x0 sin z0 + y0 cos z0 )
yi+1 = yi + xi di 2 -i
zn1 = 0
zi+1 = zi - di tan-1( 2-i )
An = P  ( 1 + 2-2i )
i tan(ø)= 2 - i Ø = atan(2 – i ) Zi Rotation Final angle

0 1 45 20 -45 -25
1 1/2 26.56 -25 26.56 1.565
2 1/4 14.036 1.565 -14.036 -12.47
3 1/8 7.125 -12.471 7.125 -5.346
…. ….
….. …..
19 …. ….. -0.000195
45°
20
CORDIC Hardware

x
shift
±
shift
y ±

z
±
Lookup
Table
LANGUAGE AND TOOLS
Language – Verilog HDL is a hardware description language used to design and document
electronic systems. Verilog HDL allows designers to design at various levels of abstraction.

 TOOL - ModelSim is a multi-language HDL simulation environment by Mentor Graphics, for


simulation of hardware description languages such as VHDL, Verilog and SystemC, and includes a
built-in C debugger. ModelSim can be used independently, or in conjunction with Altera Quartus
or Xilinx ISE. Simulation is performed using the graphical user interface (GUI), or automatically
using scripts.
APPLICATION

• CORDIC sine/cosine generators in satellite data processing


systems altitude determination .
• Cordic modules has been proposed for calculation of Legendre
Polynomials. Increase in speed 40% compared to s/w running on
333Mhz Pentium .

• Direct Digital Synthesis generates a new frequency based


upon an original reference frequency.
CONVENTIONAL DDC

SBP(k)
I(K)=SBP(K) cos(*)

Q(K)=SBP(K) sin(*)

Cos(*) Sin(*)
Disadvantage
(2n * n bit) Large lookup table
CORDIC DDC

0 Xin
Xout SBP(K) cos(*)
SBP(k) Yin (n*n bits)
Yout SBP(k) sin(*)
ø angle

Small lookup table


REFRENCES

• Survey of CORDIC algorithms for FPGA based computers –R.Andraka


• FPGA Implementation of Sine and Cosine Generators using the CORDIC
algorithm.
• Computer Arithmetic –B. Parhami
• Digital Arithmetic –Milos.E
• Computer Arithmetic –I.Koren
THANK YOU

You might also like