Section 7 Compact Opcode Use; Cycle Count Of An Instruction; Opening Small Rep And Do Loops - Motorola DSP56600 Manual

Application optimization for digital signal processors
Table of Contents

Advertisement

Section 7
COMPACT OPCODE USE
The rich instruction set of the DSP56300 and DSP56600 gives a great
amount of flexibility to the DSP software engineer when writing the
DSP code. However, careful selection of the right opcode will help
the user to generate an optimized application. There are few aspects
of the instruction set that should be considered when choosing the
opcode to be used:

• Cycle count of an instruction

• Addressing modes
• Word count of an instruction
• Peripheral addressing
• Special instructions
The following paragraphs briefly describe important aspects of the
instruction set. Please consult with Appendix B of the DSP56300
and DSP56600 Family Manuals for details on the exact cycle count
and word count of each instruction.
7.1
CYCLE COUNT OF AN INSTRUCTION
Most of the instructions are executed in one clock cycle. Among
them are most of the arithmetic instructions and the move
instructions. But some instructions need more clock cycles to
execute. The following paragraph will describe ways to minimize
the effect of these multi-cycle instructions on total code
performance.
7.1.1

Opening Small REP and DO Loops

The REP and DO instructions are a multi-cycle instructions that
needs several cycles to decode before the actual loop is executed.
Hence, a loop that should be iterated a small number of times will
take a long time to execute if initiated by the REP or DO
instructions. In the following example, a DO loop contains an
internal REP loop that should iterate ten times:
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
This section
describes ways to
optimize the size
and speed of the
code by efficiently
using the
instruction set.
7-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents