The Max Instruction - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

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,
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:
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:
move
clr
rep
maxm
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.
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
max
a,b
cmp
a,b
tlt
a,b
#DATA_POINTER,r0
b
x:(r0)+,a
#n
a,b
x:(r0)+,a
cycles
1
1+3 interlock
5
N
Data Operations
The Max instruction
2-7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents