Motorola DSP56305 User Manual Page 22

  • Download
  • Add to my manuals
  • Print
  • Page
    / 112
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 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.
Page view 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 111 112

Comments to this Manuals

No comments