Inferensys

Glossary

CORDIC Algorithm

An iterative shift-and-add algorithm for computing trigonometric, hyperbolic, and logarithmic functions, widely used in digital signal processing for efficient vector rotation.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
EFFICIENT VECTOR ROTATION

What is CORDIC Algorithm?

The CORDIC algorithm is a shift-and-add iterative method for computing trigonometric, hyperbolic, and logarithmic functions, eliminating the need for hardware multipliers in digital signal processing.

The CORDIC (COordinate Rotation DIgital Computer) algorithm is an iterative shift-and-add technique that computes trigonometric, hyperbolic, and logarithmic functions using only additions, subtractions, bit-shifts, and a small lookup table. By decomposing a desired rotation angle into a series of predefined micro-rotations, CORDIC avoids resource-intensive hardware multipliers, making it ideal for FPGA and ASIC implementations in wideband signal processing pipelines where real-time vector rotation is required for digital down-conversion and phase correction.

CORDIC operates in two primary modes: rotation mode, which rotates a vector by a given angle to compute sine and cosine, and vectoring mode, which determines the magnitude and angle of an input vector. In wideband applications, the algorithm's deterministic latency and multiplier-less architecture enable efficient implementation of numerically controlled oscillators (NCOs), IQ imbalance correction, and complex mixing operations within tight resource constraints. Modern variants extend the algorithm to hyperbolic functions for computing square roots and logarithms directly in hardware.

ALGORITHM FUNDAMENTALS

Key Characteristics of CORDIC

The COordinate Rotation DIgital Computer (CORDIC) algorithm is a class of shift-and-add iterative methods that compute trigonometric, hyperbolic, and logarithmic functions using only additions, subtractions, and bit-shifts—eliminating the need for hardware multipliers.

01

Shift-and-Add Iteration Core

CORDIC replaces complex function evaluation with a sequence of micro-rotations.

  • Each iteration rotates a vector by a fixed, pre-computed angle stored in a lookup table.
  • The rotation angle for step i is atan(2^{-i}), allowing the multiplication by the tangent to be implemented as a simple binary right-shift.
  • The algorithm operates in one of two modes: Rotation Mode (driving the angle accumulator to zero) or Vectoring Mode (driving the Y-coordinate to zero).
  • Convergence is guaranteed for angles within approximately ±99.7° for circular CORDIC.
02

Three Operating Configurations

CORDIC is a unified algorithm that computes different function classes by changing a single parameter m in the iteration equations:

  • Circular (m=1): Computes sine, cosine, arctangent, and vector magnitude. The fundamental mode for digital down-conversion and FFT twiddle factor generation.
  • Linear (m=0): Performs multiplication, division, and linear coordinate transforms without a hardware multiplier.
  • Hyperbolic (m=-1): Computes hyperbolic sine, cosine, arctanh, natural logarithm, and exponential functions.

This unification allows a single hardware core to serve multiple DSP functions.

03

Hardware Efficiency Advantage

CORDIC's primary value in FPGA and ASIC designs is the elimination of embedded multipliers and block RAM for elementary function generation.

  • A fully pipelined CORDIC core uses only registers, adders, and barrel shifters.
  • Latency equals the number of iterations (typically 12-16 for single-precision accuracy), but throughput can reach one result per clock cycle after pipeline fill.
  • Compared to a lookup-table with linear interpolation, CORDIC consumes significantly fewer block RAM resources for high-precision angle generation.
  • The regular, repetitive structure maps efficiently to FPGA logic slices and supports high clock frequencies.
04

Scale Factor Correction

Each CORDIC micro-rotation extends the vector length by a factor of 1/cos(atan(2^{-i})). The product of these extensions across all iterations converges to a constant scale factor K ≈ 1.64676 for circular CORDIC.

  • In Rotation Mode, the output coordinates must be multiplied by 1/K to restore the correct magnitude.
  • This correction can be absorbed into subsequent processing stages or implemented as a constant-coefficient multiplier.
  • In Vectoring Mode, the computed magnitude is already scaled by K, requiring the same compensation.
  • Some implementations pre-scale the initial values to avoid a post-correction multiplication.
05

Pipelined vs. Iterative Architectures

CORDIC implementations trade off resource usage against throughput:

  • Iterative (Folded): A single CORDIC stage is re-used sequentially, controlled by a state machine. Minimal logic area but requires N clock cycles per result. Suitable for low-sample-rate applications.
  • Fully Pipelined (Unrolled): Each iteration is instantiated as a dedicated hardware stage. Produces a new result every clock cycle at the cost of N times the logic. Ideal for wideband DDC and real-time NCO applications.
  • Hybrid: Partially unrolled designs balance area and throughput by grouping multiple iterations per pipeline stage.
06

Application in Digital Down-Conversion

CORDIC is the standard method for implementing Numerically Controlled Oscillators (NCOs) in wideband DDC chains.

  • A phase accumulator generates a linearly increasing angle, and the CORDIC core in circular rotation mode simultaneously produces the corresponding sine and cosine values.
  • This generates the complex local oscillator signal required to mix an input signal to baseband.
  • The technique inherently maintains quadrature balance between I and Q outputs, avoiding the IQ imbalance issues of separate sine/cosine lookup tables.
  • Spurious-Free Dynamic Range (SFDR) is determined by the phase accumulator width and the number of CORDIC iterations.
CORDIC ALGORITHM DEEP DIVE

Frequently Asked Questions

Explore the fundamental mechanics, implementation trade-offs, and practical applications of the COordinate Rotation DIgital Computer algorithm for efficient vector rotation in resource-constrained digital signal processing systems.

The CORDIC (COordinate Rotation DIgital Computer) algorithm is an iterative shift-and-add technique for computing trigonometric, hyperbolic, and logarithmic functions using only integer arithmetic—specifically additions, subtractions, and bit-shifts. It operates by decomposing a desired rotation angle into a sequence of pre-computed micro-rotations. In each iteration, the algorithm rotates a vector by a fixed elementary angle atan(2^(-i)), where i is the iteration index. The direction of each micro-rotation is determined by the sign of the remaining angle accumulator. Because the elementary angles are chosen such that multiplication by tan(angle) reduces to a simple binary shift, the algorithm completely eliminates the need for hardware multipliers. This makes it exceptionally efficient for FPGA and ASIC implementations where multiplier resources are scarce or latency must be deterministic. The algorithm converges linearly, typically requiring one iteration per bit of output precision.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.