Motorola DSP56305 Manuel d'utilisateur Page 87

  • 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 86
7-2 Optimizing DSP56300/DSP56600 Applications MOTOROLA
Compact Opcode Use
Cycle Count of an Instruction
move r4,n4
move r0,n0
do #N,_loop
...
move x:(r0)+,x0 y:(r4)+,y0
rep #10
mac x0
,y0,ax:(r0)+,x0 y:(r4)+,y0
move n0,r0
move n4,r4
move x(r1)+,x1
...
_loop
The cycle count of this loop is increased by the number of cycles it
takes to decode the REP instruction, which is 5. The code may be
optimized by replacing the REP with in-line assembly and
restructuring some instructions to have parallel moves, saving 8N
cycles:
move #-9,n0
move #-9,n4
do #N,_loop
...
move x:(r0)+,x0 y:(r4)+,y0
DUP 8
mac x0,y0,a x:(r0)+,x0 y:(r4)+,y0
ENDM
mac x0
,y0,ax:(r0)+n0,x0 y:(r4)+n4,y0
mac x0,y0,a x(r1)+,x1
...
_loop
7.1.2 Replacing Jumps with Conditional Execution
Instructions
The various JUMP and BRANCH instructions are a multi-cycle
instructions that needs several cycles to decode before actually
branching to the target. When a code needs to branch to certain
locations based upon various conditions, the Conditional Execution
Instructions can be used, thus reducing the number of cycles
required by the JUMP instructions. In the following example, the
IFcc instruction is used in parallel of arithmetic opcodes to replace a
conditional branch, saving 3 to 8 cycles.
Vue de la page 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 111 112

Commentaires sur ces manuels

Pas de commentaire