Motorola DSP56305 Manuel d'utilisateur Page 28

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 112
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 27
Data Operations
Using Less Straight-Forward Instructions
MOTOROLA Optimizing DSP56300/DSP56600 Applications 2-13
The features that help in this case are:
The ability to specify combinations of signed and unsigned
operands
The 24-bit right arithmetic shifting inherent in the DMAC
instruction
Using these instruction combinations, and others, enables the
programmer to build other multi-register arithmetic operations. The
user is referred to Appendix A of the
DSP56300
and
DSP56600
Family Manuals
for the full documentation of the various
instruction options.
2.7 USING LESS STRAIGHT-FORWARD
INSTRUCTIONS
The rich instruction set includes many instructions that are in fact
combinations of smaller atomic operations. Among these
instructions are ADDL, ADDR, MAX, EXTRACT, INSERT, MACR,
and MPYR.
A good example of using some of these less straight-forward
instructions is the SQROOT routine. The following is a straight
forward implementation of that routine:
sqroot
;determine 2nd term and add contribution
asr a
sub #$4000,a ;a = L_Temp1
move a1,x0 ;x0 = swTemp
sub #$8000,a ;a = L_Temp1
;determine 3rd term and add contribution
mpy -x0,x0,b ;b = swTemp ^ 2
move b1,x1 ;x1 = swTemp2
asr b
add b,a ;a = L_Temp0
;determine 4th term and add contribution
mpy -x0,x1,b ;b = swTemp x swTemp2
move b1,y0 ;y0 = swTemp3
asr b
add b,a ;a = L_Temp1
;determine partial 5th term
mpyr x0,y0,b
move b,y1 ;y1=swTemp4
Vue de la page 27
1 2 ... 23 24 25 26 27 28 29 30 31 32 33 ... 111 112

Commentaires sur ces manuels

Pas de commentaire