SlideShare a Scribd company logo
1
TOPIC:
Direct Memory Access (DMA)
By-
Dr. Bineet Kaur (Asst. Prof., DICE)
2
Direct Memory Access
3
 In DMA, the CPU is idle and the peripheral device manage the memory
buses directly.
● DMA controller takes over the buses to manage the transfer directly
between the I/O device and memory.
● The DMA transfer can be made in several ways.
● Burst Transfer - A block of memory words is transferred in a continuous
burst at a time. Used for fast devices such as magnetic disks, where data
transmission cannot be stopped or slowed down until an entire block is
transferred.
● Cycle Stealing - Allows the DMA controller to transfer one data word at a
time, after which it must return control of the buses to the CPU.
 The CPU merely delays its operation for one memory cycle to allow the
direct memory I/O transfer to “steal” one memory cycle.
Direct Memory Access
4
Working of DMA
 The Bus Request (BR) input is used by the DMA
controller to request the CPU to relinquish control
of the buses.
● When this input is active, the CPU terminates the
execution of the current instruction and places the
address bus, the data bus, and the read and write
lines into a high-impedance state.(like an open
circuit)
● The CPU activates the Bus Grant (BG) output to
inform the external DMA that the buses are in the
high-impedance state.(available)
● The DMA takes control of the buses to conduct
memory transfers without processor intervention.
● When the DMA terminates the transfer, it disables
the bus request line and the CPU disables the bus
grant, takes control of the buses, and returns to its
normal operation.
5
Direct and Indirect Addressing Modes
 The registers in the DMA are selected by
the CPU through the address bus by
enabling the DMA Select (DS) and
Register Select (RS) inputs.
● When the BG (bus grant) = 0, the CPU can
communicate with the DMA registers.
● When BG = 1 DMA can communicate
directly with the memory.
● The DMA controller has three registers.
● The Address register contains an address
to specify 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 external
peripheral through the request and
acknowledge lines.
6
I/O Device sends a DMA request.
➜ DMA Controller activates the BR line.
➜ CPU responds with BG line.
➜ The DMA puts the current value of its
address register into the address bus, initiates
the RD or WR signal, and sends a DMA
acknowledge to the I/O device.
➜ I/O device puts a word in the data bus (for
write) or receives a word from the data bus
(for read).
➜ The peripheral unit can then communicate
with memory through the data bus for direct
transfer between the two units while the CPU
is momentarily disabled.
DMA Transfer
7
➜ For each word that is transferred, the DMA
increments its address register and
decrements its word count register.
➜ If the word count does not reach zero, the
DMA checks the request line coming from the
I/O Device.
➜ If there is no request ,the DMA disables BR
so that the CPU continues to execute its own
program.
➜ When CPU requests another transfer, DMA
requests bus again.
➜ If the word count register reaches zero, the
DMA stops any further transfer and removes
its bus request. It also informs the CPU of the
termination by an interrupt.
DMA Transfer
8
Thank You

More Related Content

PPTX
Direct Memory Access(DMA).pptx ppt ppt ppt
PPTX
Direct Memory Access
PPTX
DMA presentation [By- Digvijay]
PPTX
Aryan_camemoryhierchyandmanagements.pptx
PPTX
I/O Interfaces: Bridging the Digital and Physical Worlds
PPTX
Dma and dma controller 8237
PPTX
Direct memory access (dma)
PDF
Unit 4-input-output organization
Direct Memory Access(DMA).pptx ppt ppt ppt
Direct Memory Access
DMA presentation [By- Digvijay]
Aryan_camemoryhierchyandmanagements.pptx
I/O Interfaces: Bridging the Digital and Physical Worlds
Dma and dma controller 8237
Direct memory access (dma)
Unit 4-input-output organization

Similar to Direct Memory Access (DMA) in Computer Organisation and Architecture pptx (20)

PDF
Unit 4-input-output organization
PPTX
DMA operation
PPTX
ch -6 IO.pptx
PPTX
8237 dma controller
PPTX
Direct Memory Access(DMA)
DOC
Dma transfer
PPTX
DMA airctecture.pptx
PPTX
Direct memory access controller slide.pptx
PPT
Unit3 pipelining io organization
PPTX
Direct Memory Access (DMA).pptx
PPTX
8257 DMA Controller
PPTX
MPI UNIT 4 - (Introduction to DMA and ADC)
PPTX
This pot is about computer architecture.
PPTX
UNIT 3.pptx
PPTX
Input Output Organization
PPT
8237 / 8257 DMA
PPTX
Direct access memory
PDF
DMA_document__1696148675.pdf
Unit 4-input-output organization
DMA operation
ch -6 IO.pptx
8237 dma controller
Direct Memory Access(DMA)
Dma transfer
DMA airctecture.pptx
Direct memory access controller slide.pptx
Unit3 pipelining io organization
Direct Memory Access (DMA).pptx
8257 DMA Controller
MPI UNIT 4 - (Introduction to DMA and ADC)
This pot is about computer architecture.
UNIT 3.pptx
Input Output Organization
8237 / 8257 DMA
Direct access memory
DMA_document__1696148675.pdf
Ad

Recently uploaded (20)

PPTX
sdn_based_controller_for_mobile_network_traffic_management1.pptx
PPT
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
PDF
-DIGITAL-INDIA.pdf one of the most prominent
PPTX
"Fundamentals of Digital Image Processing: A Visual Approach"
PPTX
code of ethics.pptxdvhwbssssSAssscasascc
PDF
Smarter Security: How Door Access Control Works with Alarms & CCTV
DOCX
fsdffdghjjgfxfdghjvhjvgfdfcbchghgghgcbjghf
PPTX
ERP good ERP good ERP good ERP good good ERP good ERP good
PPTX
Entre CHtzyshshshshshshshzhhzzhhz 4MSt.pptx
PPT
Hypersensitivity Namisha1111111111-WPS.ppt
PPTX
Sem-8 project ppt fortvfvmat uyyjhuj.pptx
PPTX
PLC ANALOGUE DONE BY KISMEC KULIM TD 5 .0
PPT
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
PPTX
Wireless and Mobile Backhaul Market.pptx
PPTX
Fundamentals of Computer.pptx Computer BSC
PPTX
Syllabus Computer Six class curriculum s
PDF
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PDF
PPT Determiners.pdf.......................
PDF
Cableado de Controladores Logicos Programables
PPTX
Lecture-3-Computer-programming for BS InfoTech
sdn_based_controller_for_mobile_network_traffic_management1.pptx
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
-DIGITAL-INDIA.pdf one of the most prominent
"Fundamentals of Digital Image Processing: A Visual Approach"
code of ethics.pptxdvhwbssssSAssscasascc
Smarter Security: How Door Access Control Works with Alarms & CCTV
fsdffdghjjgfxfdghjvhjvgfdfcbchghgghgcbjghf
ERP good ERP good ERP good ERP good good ERP good ERP good
Entre CHtzyshshshshshshshzhhzzhhz 4MSt.pptx
Hypersensitivity Namisha1111111111-WPS.ppt
Sem-8 project ppt fortvfvmat uyyjhuj.pptx
PLC ANALOGUE DONE BY KISMEC KULIM TD 5 .0
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
Wireless and Mobile Backhaul Market.pptx
Fundamentals of Computer.pptx Computer BSC
Syllabus Computer Six class curriculum s
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PPT Determiners.pdf.......................
Cableado de Controladores Logicos Programables
Lecture-3-Computer-programming for BS InfoTech
Ad

Direct Memory Access (DMA) in Computer Organisation and Architecture pptx

  • 1. 1 TOPIC: Direct Memory Access (DMA) By- Dr. Bineet Kaur (Asst. Prof., DICE)
  • 3. 3  In DMA, the CPU is idle and the peripheral device manage the memory buses directly. ● DMA controller takes over the buses to manage the transfer directly between the I/O device and memory. ● The DMA transfer can be made in several ways. ● Burst Transfer - A block of memory words is transferred in a continuous burst at a time. Used for fast devices such as magnetic disks, where data transmission cannot be stopped or slowed down until an entire block is transferred. ● Cycle Stealing - Allows the DMA controller to transfer one data word at a time, after which it must return control of the buses to the CPU.  The CPU merely delays its operation for one memory cycle to allow the direct memory I/O transfer to “steal” one memory cycle. Direct Memory Access
  • 4. 4 Working of DMA  The Bus Request (BR) input is used by the DMA controller to request the CPU to relinquish control of the buses. ● When this input is active, the CPU terminates the execution of the current instruction and places the address bus, the data bus, and the read and write lines into a high-impedance state.(like an open circuit) ● The CPU activates the Bus Grant (BG) output to inform the external DMA that the buses are in the high-impedance state.(available) ● The DMA takes control of the buses to conduct memory transfers without processor intervention. ● When the DMA terminates the transfer, it disables the bus request line and the CPU disables the bus grant, takes control of the buses, and returns to its normal operation.
  • 5. 5 Direct and Indirect Addressing Modes  The registers in the DMA are selected by the CPU through the address bus by enabling the DMA Select (DS) and Register Select (RS) inputs. ● When the BG (bus grant) = 0, the CPU can communicate with the DMA registers. ● When BG = 1 DMA can communicate directly with the memory. ● The DMA controller has three registers. ● The Address register contains an address to specify 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 external peripheral through the request and acknowledge lines.
  • 6. 6 I/O Device sends a DMA request. ➜ DMA Controller activates the BR line. ➜ CPU responds with BG line. ➜ The DMA puts the current value of its address register into the address bus, initiates the RD or WR signal, and sends a DMA acknowledge to the I/O device. ➜ I/O device puts a word in the data bus (for write) or receives a word from the data bus (for read). ➜ The peripheral unit can then communicate with memory through the data bus for direct transfer between the two units while the CPU is momentarily disabled. DMA Transfer
  • 7. 7 ➜ For each word that is transferred, the DMA increments its address register and decrements its word count register. ➜ If the word count does not reach zero, the DMA checks the request line coming from the I/O Device. ➜ If there is no request ,the DMA disables BR so that the CPU continues to execute its own program. ➜ When CPU requests another transfer, DMA requests bus again. ➜ If the word count register reaches zero, the DMA stops any further transfer and removes its bus request. It also informs the CPU of the termination by an interrupt. DMA Transfer