Professional Documents
Culture Documents
Interfacing Techniques
Lecture 13
Review of I/O Types
1. Programmed I/O
I/O between memory and the I/O device is performed by the Processor: e.g.
IN AL,DX
MOV [DI],AL; Transfer is through the mP - slow!
1.1 Polling/Handshaking I/O
Processor checks device readiness repeatedly, e.g. in a tight loop
DMA finished
Device Requests
I/P DMA Transfer
DMA Request
O/P Granted- mP has relinquished
control of the buses
DMA Applications
• Wherever large amounts of data need to be transferred
fast between memory and an I/O peripheral device, e.g.
- Hard disk, CD
- Video memory to refresh display
- Sound cards
- Network cards
- Data acquisition boards
• Also for row address generation by hardware to refresh
large DRAMs fast
I/O
Write
Memory
HOLD Read
C
Simultaneously !
Memory address
Generated by fast
Counters on the DMAC
DMA Control Signals
• Because during a DMA both memory and an I/O device
may be accessed simultaneously, the DMAC may need to
generate:
- #MRDC and #IOWC (simultaneously) for memory to I/O
device transfers
- #IORC and #MRWC (simultaneously) for I/O device to
memory transfers
With HLDA
Active
programming operation
16-bit addresses For address
- Data Bus
(during
Programng)
• Allows the following DMA transfer Counters
- A8-A15
During DMA
DMA
combinations: Device
- Memory to peripheral
- Peripheral to memory
- Peripheral to peripheral
- Memory to memory
• No longer used on the PC in chip form nowadays- its
functionality has been embedded into modern chip
set ICs
Programming the DMAC
Only
for
a
byte
(buffer full)
As long (buffer full)
As Device
Is Ready Block finished?
(filling its buffer)
As long
as needed
to transfer the block
DMAC gets more greedy for bus control