- Asked 6/22
- 2078 Kartik · 6 marks
- 2078 Bhadra · 6 marks
- 2076 Asoj · 8 marks
- 2075 Chaitra · 5 marks
- 2074 Asoj · 10 marks
- 2072 Chaitra · 6 marks
DMA controller block diagram and transfer
Short answer
A DMA controller has address and word count registers. CPU programs these, then the device raises a DMA request; the controller requests the bus, gets grant, transfers one word directly between device and memory, increments address, decrements count. When count reaches zero, it interrupts CPU.
Explain the block diagram of a DMA controller and explain how DMA is used to transfer data from a peripheral.
A DMA (direct memory access) controller transfers blocks of data between an I/O device and main memory without passing each word through the CPU.
Block diagram
Address bus <----> +--------------------+
(from CPU) DS --------> | Address register |
RS --------> +--------------------+
RD <------> | Word count register|
WR <------> +--------------------+
Data bus <------------> | Control register |
+--------------------+
| Control logic |
BR (bus request) <-----| |
BG (bus grant) ----->| |
Interrupt <-----| |
DMA request <-----------| from I/O device |
DMA acknowledge ----------> to I/O device |
+--------------------+
- Address register: holds the memory address of the next word to transfer; it increments after each word.
- Word count register: holds the number of words left; it decrements after each word. When it reaches zero the transfer is finished and an interrupt is sent to the CPU.
- Control register: sets the mode of transfer (read or write, burst or cycle stealing).
- DS, RS (DMA select, register select): the CPU uses them with RD/WR to program the three registers through the data bus.
- BR, BG: the DMA controller asks the CPU for the buses with BR; the CPU grants them with BG and tri-states its address, data and control lines.
- DMA request / acknowledge: handshake lines with the I/O device.
Data transfer from a peripheral using DMA
- Initialisation by CPU: the CPU writes the starting memory address, the word count and the transfer direction into the DMA controller, and starts the device. The CPU then continues with other work.
- DMA request: when the peripheral has data ready, it sends a DMA request to the controller.
- Bus request: the controller sends BR to the CPU.
- Bus grant: the CPU finishes its current bus cycle, floats its buses and replies with BG.
- Acknowledge: the controller sends DMA acknowledge to the device and places the address register on the address bus.
- Transfer: one word moves directly between the device and memory (write or read signal from the controller). The address register is incremented and the word count is decremented.
- Repeat or release: in burst mode the controller keeps the bus until the block is done; in cycle-stealing mode it releases the bus after every word.
- Completion: when the word count becomes zero, the controller drops BR and interrupts the CPU. The CPU then takes back control and checks the status.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Direct mapping with 32-block memory, 10 blocks used · Computer Organization and Architecture, chapter 6 · asked 3×
- Direct mapping with 64-block memory, 10 blocks used · Computer Organization and Architecture, chapter 6 · asked 3×
- DMA vs CPU memory request · Computer Organization and Architecture, chapter 7
- Need for IOP and DMA control · Computer Organization and Architecture, chapter 7
- Hardwired vs microprogrammed; sequencer diagram · Computer Organization and Architecture, chapter 3
- Direct mapping with 32-block memory, 8-block cache · Computer Organization and Architecture, chapter 6 · asked 3×
- PID controller block diagram, transfer function, characteristics · Control Systems, chapter 7
- DMA controller and flow of actions · Embedded System, chapter 5 · asked 3×
- MBI block diagram, advantages and DMA · Instrumentation II, chapter 1
- Derivative feedback controller: block diagram and effect · Control Systems, chapter 7 · asked 2×
All Computer Organization and Architecture chapter 7 questions →