Motorola DSP56305 Manuel d'utilisateur Page 22

  • 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 21
Data Operations
The Max instruction
MOTOROLA Optimizing DSP56300/DSP56600 Applications 2-7
2.3 THE MAX INSTRUCTION
MAX is a new instruction in the DSP56300 and DSP56600
instruction set that can used to enhance performance in critical data
operation loops. For example,
max a,b
compares the two accumulators, and places the bigger value in the
destination accumulator (accumulator B). The MAXM instruction
does the same thing, only it transfers the bigger absolute value to
the destination .
Like other data operations, this instruction is effectively executed in
one clock cycle. Previously such functionality was achieved in two
cycles, for example:
cmp a,b
tlt a,b
Note: This example differs from the MAX functionality only in the
status update.
The MAXM instruction can be used to find the largest number in an
array of values, in N + 10 clock cycles:
cycles
move #DATA_POINTER,r0 1
clr b x:(r0)+,a 1+3 interlock
rep #n 5
maxm a,b x:(r0)+,a N
The initialization of R0 takes 4 cycles due to an address register
interlock. The three cycle stall could be used for other useful
instructions (see Section 6.2.1 on page 6-7).
Note: The MAX and MAXM instructions can only be used with
fixed operands (A as first source, B as destination). There is
no opcode for MAX B,A.
Vue de la page 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 111 112

Commentaires sur ces manuels

Pas de commentaire