Motorola DSP56600 Manual page 29

Application optimization for digital signal processors
Table of Contents

Advertisement

Data Operations
Using Less Straight-Forward Instructions
2-14
Optimizing DSP56300/DSP56600 Applications
;determine partial 6th term
mpy
rnd
move
;determine 5th term and add its contribution
mpy
add
;determine 6th term and add its contribution
macr
rts
In this example, the ADDR and MPYR instructions replace a few
instructions in the original code causing some reduction in total
cycle count:
sqroot
;determine 2nd term and add contribution
asr
sub
sub
;determine 3rd term and add contribution
mpy
addr
;determine 4th term and add contribution
mpy
addr
;determine partial 5th term
mpyr
;determine partial 6th term
mpyr
;determine 5th term and add its contribution
mac
;determine 6th term and add its contribution
macr
rts
-x1,y0,b
b
b,x1
-#$5000,y1,b
;b = 0 - (swTemp4 x
;TERMS_MULTIPLIER)
b,a
#$7000,x1,a
;swSqrtOut is contained in a
a
#<$40,y1
y1,a
#<$80,x1;a = L_Temp1
x1,a
a1,x0
;a = L_Temp1,x0 = swTemp
-x0,x0,b
;b = swTemp ^ 2
;x1 = swTemp2, b = L_Temp0
a,b
b1,x1
-x0,x1,a#<$70,y1;a = swTemp x swTemp2
;y0 = swTemp3, a = L_Temp1
b,a
a1,y0
x0,y0,b#<$50,x0
;y1=swTemp4
-x1,y0,bb,x1
-x0,x1,ab,x1
;b = -(swTemp4 x
;TERMS_MULTIPLIER)
x1,y1,a
;swSqrtOut is contained in a
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents