Motorola DSP96002 User Manual page 644

32-bit digital signal processor
Table of Contents

Advertisement

fadd.x
d2,d1
fscale.x
_cordic
fcopys.s
end
Argument Reduction
Quadrantizing
CORDIC Algorithm
B.1.53
Four Quadrant Trigonometric TANGENT (CORDIC Algorithm)
page
opt
tabsize
org
scale
set
tantab
tanarg
set
dup
scale
set
dc
tanarg
set
endm
org
;
;
Do argument reduction, input in d6 in degrees
;
move
fadd.x
d7,d6
fmpy.x
d5,d6,d6
floor
d6,d5
fsub.x
d5,d6
fmpy.x
d5,d6,d6
fadd.x
d7,d6
;
MOTOROLA
#-1,d6
d3,d0
Totals:
132,60,1,1
mex,cex
equ
16
x:0
1.0
45.0*3.14159/180.0
tabsize
scale*@cos(tanarg)
@tan(tanarg)
tanarg/2.0
p:$100
#-180.0,d7.s
#1.0/360.0,d5.s
#360.0,d5.s
DSP96002 USER'S MANUAL
;y'=y+x*tan
;alp=alp/2
;fix sign of cosine
Program
ICycles
Words
10
10
8
8
16
8N+9
----
-------
34
8N+27
;get range min
;adjust to min, get range
;reduce range
;get int part
;get frac part, spread
;spread fraction part to range
;adjust to min
B-125

Advertisement

Table of Contents
loading

Table of Contents