Motorola DSP56600 Manual page 52

Application optimization for digital signal processors
Table of Contents

Advertisement

move
move
move
movep
movep
movep
; DMA control word:% 1 0 011 11 0 00000 0 101 101 00 01
;
DE
1
;
DIE
0
;
DTM
011
;
DPR
11
;
DCON
0
;
DRS
00000
;
;
D3D
0
;
DAM[5:3]101
;
DAM[2:0]101
;
DS[3:2] 00
;
DS[1:0] 01
movep
jmp
;================================== main program area
MAIN_PROGRAM
do
jsr
jsr
nop
_END_LOOP
move
jsr
...
;================================== subroutine area
_SWITCH_DATA
_WAIT
jclr
#M_DTD0,x:M_DSTR,_WAIT ;verify that the DMA finished,
movep
x:(r1)+,x:M_DDR0
move
x:(r1),r0
bset
#23,x:M_DCR0
rts
MOTOROLA
Optimizing DSP56300/DSP56600 Applications
#0,m1
;modulo 1. each increment, R1 will flip
;between two consecutive addresses.
#BASE_AREA1,x:(r1)+
#BASE_AREA2,x:(r1)+;R1 will now point to
;the address storing BASE_AREA1.
;until changed, x:(r1) stores the
;base address of the current core
;processing area;
;x:(r+1) stores the base address of the
;DMA area.
;first address of external data for DMA
;transfers
#EXTERNAL_BASE,x:M_DSR0;
;destination address for first
;DMA block transfer
#BASE_AREA2,x:M_DDR0
;DMA data transfer block size.
#BLOCK_SIZE-1,x:M_DCO0
software trigger
DMA interrupts disabled
block transfer, DE trigger
highest channel priority
continuous mode disabled
DMA request source - don't care
(arbitrary value)
3 dimensional mode disabled
destination address post-increment
source address post-increment
transfer destination: x memory.
transfer source: y memory.
#$9e02d1,x:M_DCR0;initialize DMA control reg.
;and initiate first transfer
MAIN_PROGRAM
...
#(NUMBER_OF_TRANS-1),_END_LOOP
_SWITCH_DATA
_PROCESS_DATA
x:-(r1),r0
;switch base ptr for core data
_PROCESS_DATA
;last iteration, out of loop
;otherwise wait until it does.
;load new value for DMA
;destination (previous core
;processing area).
;after R1 increment, x:(r1)
;points to the prev. DMA area.
;load new core area pointer
;trigger DMA tran. to new buffer
Conserving Core MIPS by Working In Parallel
Using the DMA
4-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dsp56300

Table of Contents