CORDIC - Basic Algorithm and Enhancements

42 downloads 162 Views 1017KB Size Report
Basics of CORDIC Goal Enhancement References. CORDIC - Basic Algorithm and Enhancements. K.Sridharan, IIT Madras. February 25, 2010 ...
Basics of CORDIC Goal Enhancement References

CORDIC - Basic Algorithm and Enhancements K.Sridharan, IIT Madras

February 25, 2010

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

The CORDIC algorithm provides an iterative method of performing vector rotations by arbitrary angles using only shifts and adds. Vector rotation transform: For rotating in a Cartesian plane by angle φ. x 0 = x cos φ − y sin φ y 0 = y cos φ + x sin φ

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

The CORDIC algorithm provides an iterative method of performing vector rotations by arbitrary angles using only shifts and adds. Vector rotation transform: For rotating in a Cartesian plane by angle φ. x 0 = x cos φ − y sin φ y 0 = y cos φ + x sin φ

OR x 0 = cos φ[x − y tan φ] y 0 = cos φ[y + x tan φ]

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

If rotation angles are selected such that tan φ = ±2−i , then Xi+1 = Ki (Xi − Yi · di · 2−i ) Yi+1 = Ki (Yi + Xi · di · 2−i ) Zi+1 = Zi − di · tan−1 (2−i ) where Ki

= cos(tan−1 (2−i )) = √

1 1 + 2−2i

(1)

The scale factor Ki can be accumulated and the vector is scaled by Yp An = 1 + 2−2i n

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

Polar (R, θ) to Rectangular (X,Y) transformation:

+Y

Rotation by 65◦ θ = 65◦

+X

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

Polar (R, θ) to Rectangular (X,Y) transformation:

Initialize

+Y

X0 = R Y0 = 0 Z0 = θ +X

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

Polar (R, θ) to Rectangular (X,Y) transformation:

Rotate by tan−1 (20 ) = 45◦

+Y

X1 = X0 − Y0 Y1 = Y0 + X0 45◦

Z1 = Z0 − tan−1 (20 ) +X

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

Polar (R, θ) to Rectangular (X,Y) transformation:

Rotate by tan−1 (2−1 ) = 26.5◦ +Y 26.5◦

Y1 2 X1 = Y1 + 2 = Z1 − tan−1 (2−1 )

X2 = X1 − Y2 +X

Z2

Basics of CORDIC Goal Enhancement References

Example Conventional CORDIC architecture

Polar (R, θ) to Rectangular (X,Y) transformation:

Rotate by tan−1 (2−2 ) = 14◦

+Y 14◦

Y2 4 X2 = Y2 − 4 = Z2 + tan−1 (2−2 )

X3 = X2 + Y3 +X

Z3

Basics of CORDIC Goal Enhancement References

X0 −X0 X0 [M SB] mode

0 MUX 1 sel

Y0

Z0 [M SB]

sel

0 MUX 1 sel

register

1

+ −

mode

−Xi+1

+ barrel shifter

adder/ subtractor +/− sub

scalar

+ barrel shifter

Zi [M SB] 0 Yi [M SB] MUX

180

Z0

register

sel1

¯ reset 0 −180 1MUX sel

0 MUX 1 sel

Example Conventional CORDIC architecture

sel

adder/ subtractor +/− sub

scaler

Xi+1

Xout 0 MUX 1 sel

Yout

sel

subtractor 0 MUX 1 sel

|Z0 | < 90

comparator

0 MUX 1 sel

register counter

3

sel0 Basic CORDIC

mode

ROM

+ sub adder/ subtractor +/−

Zi+1 [M SB] 180 −180

sel 0 Zout MUX 1

Zi+1

sel 0 MUX 1

− subtractor +

Basics of CORDIC Goal Enhancement References

X0 −X0 X0 [M SB] mode

0 MUX 1 sel

Y0

Z0 [M SB]

sel

0 MUX 1 sel

register

1

+ −

mode

−Xi+1

+ barrel shifter

adder/ subtractor +/− sub

scalar

+ barrel shifter

Zi [M SB] 0 Yi [M SB] MUX

180

Z0

register

sel1

¯ reset 0 −180 1MUX sel

0 MUX 1 sel

Example Conventional CORDIC architecture

sel

adder/ subtractor +/− sub

scaler

Xi+1

Xout 0 MUX 1 sel

Yout

sel

subtractor 0 MUX 1 sel

|Z0 | < 90

comparator

0 MUX 1 sel

register counter

3

sel0 Basic CORDIC

mode

ROM

+ sub adder/ subtractor +/−

Zi+1 [M SB] 180 −180

sel 0 Zout MUX 1

Zi+1

sel 0 MUX 1

− subtractor +

Basics of CORDIC Goal Enhancement References

Bottlenecks for area

Reduce area consumption without affecting the performance in terms of accuracy and number of iterations.

Basics of CORDIC Goal Enhancement References

Bottlenecks for area

ROM : The size of the ROM is 2dlog2 (no. of

iterations)e .

Barrel shifters. Range is limited to |Z |