Motorola DSP56600 Manual page 47

Application optimization for digital signal processors
Table of Contents

Advertisement

Program Control
Using Fast Interrupts
3-18
ready to transmit another word and expects the core to move data
(generally from the memory) to the transmit register. Both these
actions include moving data from one memory-mapped register to
another, which in many processors can be done in 2 instructions
only through an intermediate core register that must be kept ready
continuously in anticipation of that event.
For this reason the MOVEP instruction (move to/from peripheral)
is included in the instruction set. In the MOVP instruction, the
peripheral address is encoded as part of the first word of the
opcode. The memory address can be specified using an address
register (with instruction length of 1 word), or an absolute address
(occupying the second word). This memory-to-memory transfer is
done without using an intermediate register of the programmer's
model.
In the following example, the DSP passes all data received from
ESSI0 to the Host Interface (HI08), thus serving as a relay. This
example assumes both the host and the DSP work much faster than
the ESSI.
org
p:I_SI0RD
movep
x:<<M_RX0,x:M_HTX
org
p:I_SI0TD
movep
x:M_HRX,x:<<M_TX0
In a second example provided below, the MOVEP instruction is
used with a pointer. It is a 1-word instruction, and that leaves room
for another instruction in the fast interrupt. Two address registers
are used to point to the receive data buffer (R4) and the transmit
data buffer area (R5). M4 and M5 should be set to a Regular Modulo
mode so the pointer values remain bounded. In the DSP56300 core,
bits 16–22 of the modifier register Mx are not used in address
generation in regular modulo modes (see Section 4 of the
DSP56300 Family Manual ). In this example, the second interrupt
instruction is used to set Bit 22 in the modifier register as a flag (for
the DSP56600, the flag should be placed elsewhere). This way the
main program may leave the buffers unattended for relatively a
long time, and then later or periodically, the program can study the
flag for a quick test to see if data was transmitted or received. After
a flag bit change is detected, the DSP can compute the exact number
of words received or transmitted from the values of the pointers.
Optimizing DSP56300/DSP56600 Applications
;essi0 receive data interrupt
;from ESSI receive register
;to host interface transmit
;register.occupies 2 words
;essi0 transmit data interrupt
;from host interface receive
;register to ESSI transmit
;register. occupies 2 words
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents