In modern computer systems, transferring data between input/output (I/O) devices and memory can slow performance if the CPU manages every step. To overcome this, a Direct Memory Access (DMA) Controller is used. It enables I/O devices to transfer data directly to or from memory without heavy CPU involvement, improving speed and efficiency.
It generates memory addresses and controls timing for efficient data movement.
Once initialize by the CPU, it operates independently to complete the transfer.
Address register: It contains the address to specify the desired location in memory.
Word count register: It contains the number of words to be transferred.
Control register: It specifies the transfer mode.
All registers in the DMA appear to the CPU as I/O interface registers. Therefore, the CPU can both read and write into the DMA registers under program control via the data bus.
The figure below shows the block diagram of the DMA controller. The unit communicates with the CPU through the data bus and control lines. The CPU selects DMA registers using address lines and control signals.
RD (Read) and WR (Write) are control signals used to specify read or write operations. When BG (bus grant) input is 0, the CPU can communicate with DMA registers. When BG (bus grant) input is 1, the CPU has relinquished the buses and DMA can communicate directly with the memory.