0% found this document useful (0 votes)
40 views

Cordic Algorithm

Uploaded by

sharanya shetty
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Cordic Algorithm

Uploaded by

sharanya shetty
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

AHA AHP

CORDIC ALGORITHM
PREPARED BY:
SHARANYA SHETTY--PES1UG21EC909
B M MADHUMITHA -- PES1UG21EC902
ARYAN KUMAR -- PES1UG21EC058
ADITYA BHARATH -- PES1UG21EC343

GUIDED BY :
DR. SUDHEENDRA K KUMAR
CONTENTS

01 INTRODUCTION 05 SYSTEMC SIMULATION

02 VERILOG DESIGN 06 SYSTEMC SYNTHSIS

03 VERILOG SIMULATION 07 SIMULATION INSIGHTS

04 SYSTEMC DESIGN 08 CONCLUSION


INTRODUCTION

In the realm of digital signal processing, the Coordinate Rotation Digital


Computer (CORDIC) algorithm stands as a versatile and efficient method for
trigonometric computations. In this project, we delve into the design and
simulation of a CORDIC module using Verilog. Our endeavor is to
encapsulate the essence of CORDIC's iterative approach, focusing on
precision and efficiency.
THEORY AND CONCEPTS
Coordinate Rotation Digital Computer (CORDIC) Algorithm:
Summary: The COordinate Rotation DIgital Computer (CORDIC) is a specialized
digital computing technique designed for real-time applications, especially in
airborne computation. It utilizes a unique method, particularly suitable for solving
trigonometric relationships in plane coordinate rotation and conversion from
rectangular to polar coordinates. CORDIC, being an entire-transfer computer,
consists of a special serial arithmetic unit with shift registers, adder-subtractors,
and specialized interconnections. It can solve equations such as:
X=K(Ycos⁡θ+Xsin⁡θ)X=K(Ycosθ+Xsinθ)
Y=K(Xcos⁡θ−Ysin⁡θ)Y=K(Xcosθ−Ysinθ)
Here, K is a constant, and the angles θ are controlled by a prescribed sequence of
conditional additions or subtractions.
THEORY AND CONCEPTS
Introduction: The CORDIC computing technique was developed for real-time
digital computers that require frequent computation of trigonometric relationships,
especially in navigation equations and coordinate transformations. The CORDIC I
prototype was designed based on this technique, providing a high solution rate for
such trigonometric relationships.
Functional Description:
CORDIC operations can be functionally described as the digital equivalent of an
analog resolver, with two primary modes:
Rotation Mode:
Involves computing the new coordinate components after rotating the
original vector by a given angle.
Vectoring Mode:
Computes the magnitude and angle of the original vector from its coordinate
components.
THEORY AND CONCEPTS
The CORDIC algorithm performs step-by-step pseudo rotations, resulting in an
overall rotation or converging to a final angular argument of zero. This technique
involves controlling the angular increments of rotation and choosing proper rotation
magnitudes for each step.
Computing Steps:
Rotation Computing Sequence:
Demonstrates the step-by-step process of rotating coordinate components
using CORDIC.
Each step involves computing new values for Y and X using the previous
values and the chosen rotation angles.
Vectoring Computing Sequence:
Shows the process of computing the magnitude and angle of a vector from
its coordinate components.
Similar to rotation, but converges the angular argument to zero.
THEORY AND CONCEPTS
Implementation:
The CORDIC algorithm requires a prescribed sequence of rotation steps,
controlled by the sign of the angles and the ATR (Arc Tangent Radix) constants.
The sequence of operations, including rotations, vectoring, and multiplications,
is orchestrated to achieve the desired trigonometric computations.
Application Example :
Demonstrates the solution flow for a navigation problem using the CORDIC
computing technique.
Shows how the algorithm can be used to calculate the course angle and
distance to a destination based on present coordinates.
THEORY AND CONCEPTS

Conclusion:
The CORDIC computing technique is well-suited for applications requiring
frequent trigonometric computations.
It provides efficient solutions for rotation and vectoring operations, utilizing a
sequence of constant-length routines.
Similar algorithms can be developed for various other computing requirements
based on the fundamental concept of CORDIC.
Overall, CORDIC offers a versatile and efficient method for performing trigonometric
computations, making it valuable for real-time computing applications, particularly in
navigation and coordinate transformations.
THEORY AND CONCEPTS

Rotation of vector on a two-dimensional plane. Hardware implementation of a CORDIC iteration.


CODE OVERVIEW

1. Our Verilog code commences with the declaration of input/output ports along with
clock signals and internal variables.
2. The number of iteration stages is determined by the bit size of the X and Y
variables, ensuring optimal precision.
3. We accommodate a 32-bit angle representation, wherein the upper two bits
signify the current quadrant.
4. A crucial aspect of the code involves expressing cosine and sine functions in
terms of tangent.
5. Employing a lookup table, we predefine constant values of tangent to streamline
computations.
CODE OVERVIEW

6. To enhance efficiency, we implement pipelining by utilizing separate registers


for each stage, mitigating clock cycle overhead.
7. Quadrant identification logic dynamically adjusts X and Y values, ensuring
accurate computation across all quadrants.
8. Through meticulous replication, the iterative process unfolds, iteratively refining
the approximation with each stage.
9. Each stage operates as a discrete block of code, seamlessly transitioning to the
next iteration for a cohesive computational flow.
10. The use of constants, rather than a generated table, optimizes resource
utilization while maintaining computational accuracy.
VERILOG DESIGN CODE
VERILOG DESIGN CODE
VERILOG TESBENCH CODE
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SYSTEMC DESIGN CODE
SYSTEMC DESIGN CODE
SYSTEMC TESTBENCH
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SIMULATION RESULTS
SYSTEMC SYNTHESIS

Rotation of vector on a two-dimensional plane. Dashboard of SystemC synthesis


SYSTEMC SYNTHESIS

RTL summary of SystemC synthesis Resources used in SystemC synthesis


SYSTEMC SYNTHESIS

Timing Report of SystemC synthesis Registers used in SystemC synthesis


SYSTEMC SYNTHESIS

Muxes used in SystemC synthesis Part library used in SystemC synthesis


SYSTEMC SYNTHESIS

RTL Verilog netlist generated after SystemC synthesis RTL Contents in SystemC synthesis
SYSTEMC SYNTHESIS

Netlist schematic after SystemC synthesis

Timing report after System C synthesis


SYSTEMC SYNTHESIS

Power report after System C synthesis Area report after System C synthesis
SYSTEMC SYNTHESIS

Hierarchy report with design rule violations report after System C synthesis

Timing and area report after System C synthesis


Summary report after System C synthesis
SIMULATION INSIGHTS

1. The pipelining strategy introduces a delay of 16 cycles, ensuring


convergence to the correct value with enhanced efficiency.
2. Simulation in ModelSim facilitates waveform analysis, enabling dynamic
visualization of the computed trigonometric functions.
3. Parameters such as xout can be manipulated in the analog domain,
providing insights into waveform behavior and accuracy.
4.Verilog code implementation with testbench was done and verified.
5. SystemC code was developed, synthesized using Stratus IDE and simulated
using ncsc_run.
CONCLUSION

In summary, our venture into designing and simulating the CORDIC algorithm in
Verilog underscores the fusion of precision, efficiency, and versatility in digital
signal processing. By adhering to established principles and leveraging innovative
techniques such as pipelining, we achieve robust computational capabilities
suitable for a myriad of applications.

You might also like