文档介绍:DSP C 5000
Chapter 8
Direct Memory Access (DMA)
Copyright © 2003 Texas Instruments. All rights reserved.
Direct Memory Access
In a real-time system, DMA is used to transfer data from peripheral/memory and memory/peripheral without burdening the CPU :
DMA
Input Data
serial or parallel
Memory
internal/external
Let’s see how theDMA performsits tasks...
C55x
C54x
Performs data transfers without CPU intervention
Terminology
- Element: basic unit of transfer (1, 2 words)
- Frame: multiple elements (1-64K)
- Block: multiple frames (1-256)
SRC address
DST address
SOURCE
DEST
Transfer dependent upon:- Source/destination address- Rotating priority between channels- Event sync (different events can be selected)- Element/Frame count- Index (can select: no modification, inc/dec by 1 and element/frame index)
Max Speed: One 16-bit word per 4 CPU cycles (all bined)
Element 1
Element 2
Element 3
Element 4
Frame 1
Frame 2
Frame 3
Frame 4
C54x Direct Memory Access (DMA)
DMA Channels 0-5
Source
Destination
Elem Index
Frame Index
Control
Status
DE[5:0] Enable/disable channels
INTSEL Interrupt Multiplex Control
DPRC Channel Priority (Hi or Low)
Free Emulation Control
EHPI
EHPIAuxiliaryChannel
DMA “Resources”
Peripherals
Ext’l Mem
SARAM
DARAM
DMPREC Register
14
7
5
DE[5:0]
INTSEL
DPRC[5:0]
Free
0
6
13
8
AUTOIX
15
Only the ‘C5409, ‘10, ‘16, ‘21 and ‘41 support external DMA accesses
DMABus
Elem Count
Frame Count
DMA Registers and Resources
AUTOIX Extended reload mode
(Sync Event and Frame Count)
15
8
rsvd
Frame Count
0
7
10
11
DBLW
DSYN[3:0]
12
Frame Count: N-1 (N is desired # of frames)
DBLW: Double-word mode (0: 16-bit, 1: 32-bit)
DSYN: DMA sync event
DMMCRn (Transfer Mode Control)
15
AUTOINIT
5
DMD
0
4
10
11
DIND
DLAXS
DMS
SIND
SLAXS
8
7
6
2
1
DMD: Destination Address Space (Program, Data, I/O)
DIND: Destination Index (none, +, -, element/frame index)
DLAXS: Internal/External