Direct Memory Access (DMA)
Direct Memory Access (DMA)
Direct Memory Access (DMA)
Introduction
The transfer of data between the memory and an external device without involving the micro processor improves the speed of transfer. This transfer technique is called DMA .
www.ustudy.in
DMA Controller
Address bus Data bus Data bus buffers Address bus buffers
Internal bus
DMA select Register select Read Write Bus request Bus grant Interrupt
Address register
Control register
www.ustudy.in
DMA Controller
DMA controller is used to transfer the data between the memory and i/o device. The DMA controller needs the usual circuits to communicate with the CPU and i/o device. In addition to this, it needs an address register and address bus buffer. The address register contains an address of the desired location in memory. The word count register holds the number of words to be transferred. The control register specifies the mode of transfer. The DMA communicates with the i/o devices through the DMA www.ustudy.in
Cont..,
The RD (Read) and WR (write) signals are bidirectional. When the BG (Bus Grant) signal are bidirectional.
When the BG (Bus Grant) signal is 0, the CPU can communicate with the DMA registers through the data bus. When BG is 1, the www.ustudy.in CPU has relinquished the
DMA Transfer (
Interrupt BG BR RD WR Address Data CPU
I/O to Memory
RD Read control
WR
Address
Data
Address select
RD DS RS BR BG Interrupt
WR
Address
www.ustudy.in
Cont..,
These commands may specify transfer options such as the DMA transfer mode, but should always specify the direction of the transfer, either from I/O to memory or from memory to I/O. The last command causes the DMA controller to initiate the transfer. The controller then sets BR to 1 and, once BG becomes 1 , seizes control of the system buses.
www.ustudy.in
Peripheral devices PD PD PD PD
Memory unit
I/O bus
www.ustudy.in
Introduction
IOP : Communicate directly with all I/O devices Fetch and execute its own instruction
IOP instructions are specifically designed to facilitate I/O transfer DMAC must be set up entirely by the CPU
Cont..,
Command Instruction that are read form memory by an IOP
Distinguish from instructions that are read by the CPU Commands are prepared by experienced
www.ustudy.in
Message Center
CPU Program
Request IOP status
IOP Program
Transfer status word to memory location Check status word for correct transfer
Continue
www.ustudy.in
Cont..,
When the IOP terminates the execution of its program, it sends an interrupt request to the CPU. The CPU then issues a read I/O instruction to read the status from the IOP. The IOP transfers the status word to memory location. The status word indicates whether the transfer has been completed satisfactorily or if any error
www.ustudy.in has occurred during the transfer.
The End
Thank U
www.ustudy.in