Implementation on FPGA for CORDIC-based Computation of
Arcsine and Arccosine
Xiaoning Liu
1
, Yizhuang Xie
1
, He Chen
1
, Bingyi Li
1
1
Beijing Key Laboratory of Embedded Real-time Information Processing Technology, Beijing Institute of
Technology, Beijing 100081, China
liuxiaoning@bit.edu.cn, xyz551_bit@bit.edu.cn
Keywords: CORDIC, Double Iteration Algorithm, arcsine,
arccosine
Abstract
This paper concentrates on the hardware implementation of
CORDIC algorithm for computing inverse trigonometric
functions like arcsine and arccosine. We improve the existing
algorithm by changing the initial rotating vector of the
iterations and modifying the judging condition of rotation
direction. Due to the improvement, two iterations are saved
and the drawback of the previous algorithm is corrected.
In contrasting with the previous implementation, the
improved algorithm consumes less hardware resources and its
computing results are more accuracy.
1 Introduction
The CORDIC algorithm was originally developed in 1959 by
Jack Volder as a digital solution for real-time navigation
problems
[1]
and then was extended to a broader class of
functions
[2]
. The algorithm has been used for calculating
various trigonometric functions such as sine, cosine, arctan
and it also can be used to compute hyperbolic functions,
exponentials and square roots. CORDIC has remained
popular for its ability to calculate the results using the simple
operations of add, subtract and shift while using small Look-
Up Tables (LUTs) instead of hardware multipliers on FPGA
[3-
6].
CORDIC is widely used in the implementation of real-time
SAR imaging processing since there are many trigonometric
functions in the SAR imaging algorithm. But there are no
available IP cores for computing arcsine and arccosine
functions in the IDE (Integrated Development Environment)
of FPGA, so users need to realize the functions by using
CORDIC algorithm.
In the computation of inverse trigonometric functions like
arcsine and arccosine, the original CORDIC algorithm
displays its drawback. The accuracy of the result will get
worse due to the gain of the rotator
[7]
. Mazenc, C corrected
the gain problem by using “double iteration algorithm” at the
cost of an increase in complexity
[8]
. T. Lang proposed a
method which requires a standard CORDIC module plus a
module to compute the direction of rotation, but this approach
need a hard ware multiplier
[9]
.
The present work concentrates on the improvement and
optimization of double iteration algorithm. For real-time
calculation, pipeline structure is needed instead of feedback
structure, so that the operation module can obtain the
maximum throughput rate. The pipeline structure consumes
much more hardware resources for it must increase iteration
numbers in order to improve the accuracy. This paper mainly
works on the reduction of hardware resources by saving the
first two iterations without affecting the result of the
algorithm and the correction of the algorithm drawback when
the input argument is approach to 1.
2 Computation of Arcsine and Arccosine
The standard CORDIC algorithm can hardly be used for
computing arcsine and arccosine functions since it involves a
square root operation which cannot be replaced by add,
subtract or shift operations. Mazenc. C proposed double
iteration algorithm by introducing double iterations to the
standard CORDIC algorithm
[8]
. The main advantage of
double iterations is that in step n, the iteration t
i+1
=t
i
/cos(tan
-
1
2
-i
) becomes t
i+1
= t
i
/cos
2
(tan
-1
2
-i
) =t
n
(1+2
-2i
); now, a
multiplication by this term reduces to an add and a shift.
2.1 Double Iteration Algorithm
The double iteration algorithm in reference[8] for computing
arcsine function is:
0 0 0 0
2
1
1
1
1
2
1
1 0 0,
sign( ) sign( )
1
2
2
1
2 tan 2
2
i i i i i
i
ii
i
i
i
ii
i
i i i
i
i i i
x y z t t
d x if y t else x
xx
d
d
yy
z z d
t t t
, ,
(1)
The above formula gives
and
can
be obtained by the relationship
.
For double iterations, the convergence domain of the
algorithm becomes:
11
00
22tan 2 , tan 2 [ 3.486,3.486]
ii
ii
.
Therefore we can compute
and
for any
, since
is the domain of definition.