Beruflich Dokumente
Kultur Dokumente
Group members :
Abeda Sultana(16)
Hosneara Ahmed(17)
Dewan Israt Jahan(49)
Farhana Siddiqua (57)
Najmun Nahar Bhuiyan(64)
3/13/17 1
DMA
Direct memory access(DMA) is a
feature of computer systems that
allows certain hardware subsystems
to access main system
memory(RAM) independently of
thecentral processing unit (CPU)
3/13/17 2
DMA
DMA is a method of transferring data from
the computers RAM to another part of the
computer without processing it using CPU.
While most data that is input or output from
your computer is processed by the CPU, some
data does not require processing, or can be
processed by another device. In these
situations, DMA can save processing time and
is a more efficient way to move data from the
computer's memory to other devices.
3/13/17 3
Example of DMA
For example, a sound card may need to
access data stored in the computer's RAM,
but since it can process the data itself, it
may use DMA to bypass the CPU. Video
cards that support DMA can also access
the system memory and process graphics
without needing the CPU.Ultra DMAhard
drives use DMA to transfer data faster
than previous hard drives that required
the data to first be run through the CPU.
3/13/17 4
Principle
A DMA controller can generatememory
addressesand initiate memory read or write cycles.
It contains severalhardware registersthat can be
written and read by the CPU.
These include a memory address register, a byte
count register, and one or more control registers.
The control registers specify the I/O port to use, the
direction of the transfer (reading from the I/O
device or writing to the I/O device), the transfer
unit (byte at a time or word at a time), and the
number of bytes to transfer in one burst.
3/13/17 5
Basic features of DMA
The activity involved in transferring a
byte or word over the system
bus is called a bus cycle.
During bus cycle one component
must be the master which will have
complete control over the bus. Taking
control of the bus for a bus cycle is
called cycle stealing.
3/13/17 6
Basic features of DMA
DMA is a data transfer technique
between Main Memory and External
device. It can be used to memory to
memory transfers also.
There is no involvement of
Microprocessor.
DMA controller controls the Main
Memory in the same way the
Microprocessor do.
3/13/17 7
Basic features of DMA
Ensures very high data transfer rate.
Because the data transfer is handled
totally in hardware.
Microprocessor and DMA controller
gets control of data, address and
control bus by time sharing.
3/13/17 8
Working Principles of DMA
DMA controller is connected with the
external device (DMA requesting I/O
device).
These activate DREQ line high for
DMA service to the controller.
After the completion of current bus
cycle the microprocessor will respond
by putting a 1 on the HLDA pin to
DMA controller.
3/13/17 9
Working Principles of
DMA(cont.)
When the requesting device receives
this grant signal it becomes the
master.
It will remain master until it drops
signal to the HOLD pin , at which
time 8086 will drop the grant on the
HLDA pin.
After receiving HLDA, DMA controller
sends out a signal and takes the full
control of Data, Address and Control
3/13/17 10
Working Principles of
DMA(cont.)
DMA controller puts the content of
the address register on the address
bus.
DMA controller sends a DACK signal
to the interface to tell it to put data
on data bus.
At the same time DMA controller
asserts appropriate signals to
IOR/IOW and MEMW/MEMR pins.
3/13/17 11
Working Principles of
DMA(cont.)
Bytes of data are transferred from
the memory location indicated by the
address bus.
The address register is incremented
by 1.
3/13/17 12
Working Principles of DMA
If the byte count register is non-zero,
return to step 1 ,otherwise stop.
After completion of DMA, DMA
controller releases
a) its hold request HOLD to the
processor.
b) control of buses.
Overview of a standard DMA controller
Block Diagram of DMA controller
DMA controller
Direct memory access (DMA) is a method that allows an
input/output (I/O) device to send or receive data directly to or
from the main memory, bypassing the CPU to speed up memory
operations. The process is managed by a chip known as a DMA
controller (DMAC).
A DMA controller is designed to service one or more I/O interfaces
and each interface is connected to the controller by a set of
conductors.
A portion of a DMA controller for servicing a single interface is
called a channel. It has n channels for n different I/O devices.
8237 has 4 channels.
Many hardware systems use DMA, includingdisk
drivecontrollers,graphics cards,network cards andsound cards.
DMA is also used for intra-chip data transfer inmulti-core
processors.
DMA controller flags and registers
3/13/17 21
Registers of DMA
8237(cont.)
Request Register
3/13/17 22
Registers of DMA 8237(cont.)
Mask register
3/13/17 24
Memory to memory
transfers
counting
3/13/17 25
Memory to memory transfers(cont.)
A0 = 0 : current address
register
A0 = 1 : current count register
A2-A1 : gives the channel
number
A3 = 0 : addressing address or
count register
3/13/17 28
Other
features
Ready signal is used to extend
the bus cycles by inserting wait
states when servicing the slow
devices.