Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Direct memory access (DMA) is a process in which an external device takes over the control of system bus from the CPU.
DMA is for high-speed data transfer from/to mass storage peripherals, e.g. harddisk drive, magnetic tape, CD-ROM, and sometimes video controllers.
For example, a hard disk may boasts a transfer rate of 5 M bytes per second, i.e. 1 byte transmission every 200 ns. To make such data transfer via the CPU is both undesirable and unnecessary.
The basic idea of DMA is to transfer blocks of data directly between memory and peripherals. The data dont go through the microprocessor but the data bus is occupied. Normal transfer of one data byte takes up to 29 clock cycles. The DMA transfer requires only 5 clock cycles. Nowadays, DMA can transfer data as fast as 60 M byte per second. The transfer rate is limited by the speed of memory and peripheral devices.
DMA controller
A DMA controller interfaces with several peripherals that may request DMA. The controller decides the priority of simultaneous DMA requests communicates with the peripheral and the CPU, and provides memory addresses for data transfer. DMA controller commonly used with 8088 is the 8237 programmable device. The 8237 is in fact a special-purpose microprocessor. Normally it appears as part of the system controller chip-sets. The 8237 is a 4-channel device. Each channel is dedicated to a specific peripheral device and capable of addressing 64 K bytes section of memory.
Memoria principala
UCP
MA MD MC
HOLD HOLDA
HRQ HLDA
DRQ DACK
Controler DMA
8 BIT
STB LATCH
A0-A15 BUSEN HOLD HOLDA CPU CLOCK RESET MEMR# MEMW# IOR# IOW# D0-D7 Sistem data buss
AEN HRQ HLDA A0-A3 A4-A7 CS/ ADSTB DB0-DB7
I8237A
DREQ0-3 DACK0-3
Control buss
OE# B7
11 DIR
I8286
A7 8 7 6 5 4 3 2 A0 1
PCLK CSDMA#
11 12
CS# CLK
3 4 1 2
8 7 6 5
12 13 14 15
A0 I8237A
32 33 34 35 37 38 39 40 19 18 17 16 25 24 14 15
8 7 6 5 4 3 2 1
I8286
DIR OE#
12 13 14 15 16 17 18 19
ADR0-ADR7
HRQ 13 RESET
6 7
DRQ0-3
ADR8-ADR15
ADR16-ADR19
3 WA 2 WB 1 WE#
CLK CS1#
11
MASTER#
12
AEN1#
XA0
XA1-XA7
32 33 A0 34 35 37 38 39 40 A7 30 DB0 29 28 27 26 23 22 21 DB7 3 4 1 2
CS#
36 9 8
I8237A
XD0-XD7
19 18 17 16 25 24 14 15
DRQ0-3
DACK0-3
6 READY 13
T/C
CLK CS2#
32 33
A0
CS#
XA8
A7 DB0
I8237A
DB7
DRQ5-7
MEMR# DACK0 MEMW# DACK1 IOR# DACK2 IOW# DACK3 READY RESET HRQ HLDA HRQ HLDA
DACK5-7