Cordic Demo

Last updated: 19-Nov-2003

CORDIC, which stands for Coordinate Rotation Digital Computer, is an algorithm developed by Volder in the fifties which allows you to calculate trigonometric functions using simple shift and add operations. This is an advantage for hardware implementations were multipliers are normally resource demanding (unless you use e.g. a Virtex-II :-). The algorithm can be adapted to also compute fix/floating point multiply, divide, log, exponent and square root. This webpage describes a simple serial fix point CORDIC VHDL implementation using Mentor Graphics HDL designer (not required though). The module computes fix point sin and cos values from a given angle. The resolution can be changed using generics. The testbench compares the output with pre-calculated values from a textfile.

There is so much information on the web about CORDIC that I won't repeat the algorithm here. Have a look at some of the following links:

Source files

Tools used

Note that this is a good design example were graphics gives a better design overview than text would do. Click on the HDL Designer image below to show how the individual modules (shifters/adders/LUT/registers) are connected


Figure: Serial Cordic Module in HDL Designer (click to see high resolution version)

Running the demo using HDL Designer

Running the demo using Modelsim

Changing the bit resolution