CORDIC算法
From Wikipedia, the free encyclopedia
CORDIC (digit-by-digit method, Volder's algorithm) (for
COordinate Rotation DIgital Computer)
is a simple and efficient algorithm to calculate hyperbolic and trigonometric functions. It is
commonly used when no hardware multiplier is available (e.g.,
simple microcontrollers and FPGAs) as the
only operations it requires are addition, subtraction, bitshift and table lookup.
The modern CORDIC algorithm was first described in 1959 by
Jack E. Volder. It
was developed at the aeroelectronics department of Convair
to replace the analog resolver in the B-58 bomber's navigation computer,Henry Briggs as early as
1624. John Stephen
Walther at Hewlett-Packard further generalized the
algorithm, allowing it to calculate hyperbolic and exponential functions, logarithms, multiplications, divisions, and square roots.
Originally, CORDIC was implemented using the binary numeral system. In the 1970s,
decimal CORDIC became widely used in pocket calculators, most of which operate in binary-coded-decimal (BCD) rather than binary. CORDIC is
particularly well-suited for handheld calculators, an application
for which cost (eg, chip gate count has to be minimised) is much
more important than is speed. Also the CORDIC subroutines for trigonometric and hyperbolic
functions can share most of their code.
Application
CORDIC is generally faster than other approaches when a hardware
multiplier is unavailable (e.g., in a microcontroller based
system), or when the number of gates required to implement the
functions it supports should be minimized (e.g., in an FPGA). On the
other hand, when a hardware multiplier is available (e.g., in a DSP
microprocessor), table-lookup methods and power series are generally faster than
CORDIC.
Mode of operation
CORDIC can be used to calculate a number of different functions.
This explanation shows how to use CORDIC in rotation mode to
calculate sine and cosine of an angle, and assumes the desired
angle is given in radians and represented in a fixed point format. To determine the
sine or cosine for an angle β, the y or x coordinate
of a point on the unit
circle corresponding to the desired angle must be found. Using
CORDIC, we would start with the vector