CORDIC Algorithm Basics

cordic
algorithm
dsp
fpga
function

This page covers the basics of the CORDIC algorithm, including its function and common uses. CORDIC stands for Coordinate Rotation Digital Computer.

It’s a clever algorithm used to calculate trigonometric functions (like sine and cosine) and hyperbolic functions (like the inverse tangent). It relies on the concept of a lookup table.

Let’s say you want to calculate sin(φ) for some angle φ. A simple way to do this is to store all the values of sin(φ) for every possible value of φ in memory (RAM). Then, based on the input φ, you simply output the corresponding stored value.

CORDIC becomes especially useful when a hardware multiplier isn’t available. It’s frequently used in FPGAs (Field-Programmable Gate Arrays) and DSPs (Digital Signal Processors) where only subtraction, addition, table lookup, and bit-shift operations are readily available.

CORDIC is employed for operations such as sine, cosine, polar-to-rectangular coordinate conversion, general rotation, arctangent, vector magnitude, rectangular-to-polar conversion, arcsine, arccosine, and more.

It can also be adapted for linear functions, hyperbolic functions, square rooting, logarithms, and exponentials.

OperationModeInitializeDirection
Sine, CosineRotationx = 1/Aₙ , y = 0, z = αReduce z to Zero
Polar to Rect.Rotationx = (1/Aₙ)X mag , y = 0, z = X phaseReduce z to Zero
General RotationRotationx = (1/Aₙ)X₀ , y = (1/Aₙ)y₀ , z = αReduce z to Zero
ArctangentVectorx = (1/Aₙ)X₀ , y = (1/Aₙ)y₀ , z = 0Reduce y to zero
Vector MagnitudeVectorx = (1/Aₙ)X₀ , y = (1/Aₙ)y₀ , z = 0Reduce y to zero
Rect. to PolarVectorx = (1/Aₙ)X₀ , y = (1/Aₙ)y₀ , z = 0Reduce y to zero
Arcsine, ArccosineVectorx = (1/Aₙ), y = 0, arg = sin(α) or cos(α)Reduce y to value in arg register

CORDIC Rotation Mode and Vector Mode

There are two primary operational modes for CORDIC: rotation mode and vector mode.

Rotation Mode

CORDIC rotation mode

Vector Mode

CORDIC vector mode

The following table of CORDIC rotation angles is very useful and is typically stored in a lookup table for quick retrieval when needed.

CORDIC rotation angles

Top 10 DSP Interview Questions and Answers

Top 10 DSP Interview Questions and Answers

Prepare for your DSP job interview with these essential questions and answers. Covers architecture, filters, transforms, and more for hardware and software roles.

dsp
interview
signal processing

DSP Architecture: Algorithm Porting Guide

Explore key factors in DSP algorithm implementation, covering multipliers, barrel shifters, MAC units, ALUs, on-chip memory, parallelism, and pipelining for optimal performance.

dsp architecture
algorithm
dsp

DSP and FPGA Evaluation Boards and Kits

Explore DSP/FPGA evaluation boards and kits from vendors like MAXIM, Sundance, Xilinx, and Altera for IP core evaluation and development.

evaluation board
dsp
fpga