MOTOROLA
DSP96002 USER’S MANUAL
B-55
seedr d5,d4 ;y approx 1/sqrt(x) 1 1
fmpy.s d4,d4,d2 #.5,d7.s ;y*y, get .5 2 2
fmpy.s d5,d2,d2 #3.0,d3.s ;x*y*y, get 3.0 2 2
fmpy d4,d7,d2 fsub.s d2,d3 d3.s,d6.s ;y/2, 3-x*y*y 1 1
fmpy.s d2,d3,d4 d6.s,d3.s ;y/2*(3-x*y*y) 1 1
fmpy.s d4,d4,d2 ;y*y 1 1
fmpy.s d5,d2,d2 ;x*y*y 1 1
fmpy d4,d7,d2 fsub.s d2,d3 d3.s,d6.s ;y/2, 3-x*y*y 1 1
fmpy.s d2,d3,d4 ;y/2*(3-x*y*y) 1 1
--- ---
Totals:
11
11
B.1.30
Newton-Raphson Approximation for SQRT(x)
The approximation of sqrt(x) may be performed by using the Newton-Raphson iteration to first find 1.0/
sqrt(x). The sqrt(x) then can be approximated by x*(1.0/sqrt(x)).
Newton-Raphson Approximation
Program
ICycles
of SQRT(x)
Words
seedr d5,d4 ;y approx 1/sqrt(x) 1 1
fmpy.s d4,d4,d2 #.5,d7.s ;y*y, get .5 2 2
fmpy.s d5,d2,d2 #3.0,d3.s ;x*y*y, get 3.0 2 2
fmpy d4,d7,d2 fsub.s d2,d3 d3.s,d6.s ;y/2, 3-x*y*y 1 1
fmpy.s d2,d3,d4 d6.s,d3.s ;y/2*(3-x*y*y) 1 1
fmpy.s d4,d4,d2 ;y*y 1 1
fmpy.s d5,d2,d2 ;x*y*y 1 1
fmpy d4,d7,d2 fsub.s d2,d3 d3.s,d6.s ;y/2, 3-x*y*y 1 1
fmpy.s d2,d3,d4 ;y/2*(3-x*y*y) 1 1
fmpy.s d5,d4,d4 ;x*(1/sqrt(x)) 1 1
--- ---
Totals: 12 12
B.1.31
Unsigned Integer Divide
The unsigned integer divide operation divides two 32 bit unsigned integers. The following code divides d0/
d2 with the resulting quotient in d0 and the remainder in d1.
Summary of Contents for DSP96002
Page 3: ...1 2 DSP96002 USER S MANUAL MOTOROLA ...
Page 38: ...MOTOROLA DSP96002 USER S MANUAL 3 15 Figure 3 4 Modulo Arithmetic Unit Block Diagram ...
Page 39: ...3 16 DSP96002 USER S MANUAL MOTOROLA ...
Page 53: ...4 14 DSP96002 USER S MANUAL MOTOROLA ...
Page 76: ...MOTOROLA DSP96002 USER S MANUAL 5 23 Figure 5 8 Address Modifier Summary ...
Page 86: ...6 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 101: ...MOTOROLA DSP96002 USER S MANUAL 7 15 Figure 7 9 HI Block Diagram One Port ...
Page 140: ...7 54 DSP96002 USER S MANUAL MOTOROLA ...
Page 166: ...9 10 DSP96002 USER S MANUAL MOTOROLA ...
Page 181: ...MOTOROLA DSP96002 USER S MANUAL 10 15 Figure 10 8 Program Address Bus FIFO ...
Page 337: ...MOTOROLA DSP96002 USER S MANUAL A 149 ...
Page 404: ...A 216 DSP96002 USER S MANUAL MOTOROLA PC xxxx D ...
Page 460: ...A 272 DSP96002 USER S MANUAL MOTOROLA SIOP Not affected ...
Page 484: ...A 296 DSP96002 USER S MANUAL MOTOROLA SSH PC SSL SR SP 1 SP ...
Page 519: ...MOTOROLA DSP96002 USER S MANUAL A 331 ...
Page 718: ...MOTOROLA DSP96002 USER S MANUAL B 199 ...
Page 871: ... MOTOROLA INC 1994 MOTOROLA TECHNICAL DATA SEMICONDUCTOR M Addendum ...
Page 888: ...MOTOROLA INDEX 1 INDEX ...
Page 889: ......