IO Controllers
IO Controllers
I/O Controllers
COMP375 Computer Architecture g and Organization
The CPU, memory and bus are internal components t of f a computer. t Everything else is an input or output device.
I/O Devices
Disk Keyboard hard Speakers floppy Printer CD Mouse DVD Scanner Monitor Game controller Network USB drive Many, many more
Device Speed
COMP375
I/O Controllers
I/O controllers interface between the many different devices and the internal system components; CPU, memory and bus
Bus Memory
Bus Memory
COMP375
I/O Controllers
I/O Controller
Connects the I/O devices to the system. Communicates with the CPU and the RAM over the bus. A single I/O controller may control multiple devices. Most computers have several I/O controllers. Actions are initiated by the CPU.
Addressing Multiplexing Buffering Error detection and correction Control of multiple steps
I/O Addressing
The CPU communicates with the I/O controllers over the bus using the same f t h and fetch d store t protocol t l as memory. Each I/O controller has a unique address, possibly several addresses. I/O addresses can be
independent of memory addresses in the same as memory, but not overlapping with memory. This is memory mapped I/O.
fo r
ea ch
COMP375
fo r
fo r
1. 2. 3 3. 4. 5.
1 3 1 for each device 1 for each type of device 3 for each device
ea ch
ty pe
of de vi ce ea ch de vi ce
de vi ce
I/O Controllers
Example I/O
checkio LOAD AND JZ LOAD STORE DeviceStatus IOreadyBit DeviceData R1, DeviceStatus R1 IOreadyBit R1, checkio R2, databyte R2, DeviceData addr of I/O status register bit indicating device ready addr of I/O data register
Status
Device ready Operation complete
COMP375
I/O Controllers
Buffering
Some I/O controllers store and analyze incoming data in controller memory. An Ethernet controller will receive the data into local memory on the controller card. The data will only be transferred to RAM if it was received correctly and has the machines address. address Controllers may perform many transformations on the data.
1. 2. 3. 4.
D. Comer
COMP375
I/O Controllers
Buffer Chaining
Handles multiple transfers without the processor Device given linked list of buffers Device hardware uses next buffer on list automatically
D. Comer D. Comer
COMP375
I/O Controllers
Operation Chaining
Further optimization for smart device Processor gives series of commands to device, sometimes called a channel program Device carries out successive commands automatically
D. Comer
COMP375