Input/Output
All data manipulation not directly performed in the CPU or between CPU and
primary memory is I/O.
Resources needed in the system for I/O
Protocol - set of standardized rules for consistent interaction between
system and i/o devices, including
physical properties
of media
of interface
access methods
timing methods
timing standard
data encoding
data formats
error detection and recovery
Interface between I/O and CPU.
Memory mapped vs. port mapped vs. channel (including DMA).
Wikipedia : Memory-mapped_I/O and Channel_I/O
Buses, cables, and interfaces.
Control modules in both host(system) and peripheral devices.
Provides signal translation, timing support, physical control, etc.
(Early CD-ROMs often coupled to audio card).
I/O control methods -
CPU controlled
Memory mapped :
Interface to the I/O is treated as a set of primary memory locations.
Software drivers determine meaning of data stored or retrieved.
- Loss of some memory space (8086 - 300K) because it is reserved for
I/O interfaces. Less important with 4GiB address space.
+ All instruction modes available
- May slow overall memory bus access down.
* Cache architecture alleviates this.
- Can limit or complicate contiguous memory range.
Original x86 architecture had a 1MiB boundary because I/O was mapped
above 640K.
* Virtual memory on modern systems solve this issue.
Port mapped :
CPU has separate set of instructions that access specific pins
on CPU that act as ports or that cause a demux to connect portions
of the address and data pin-outs to a different set of lines tied
to i/o devices.
+ Separate bus tied to I/O devices. CPU can go back to using memory
bus while I/O devices prepares response on separate lines.
Run out of order instructions
and/or
Cached instructions.
- Adds complexity to CPU design and motherboard.
- Often limited set of instructions using specific CPU registers.
May need to write to memory before other actions can be taken.
Channel I/O :
CPU passes I/O chores off to secondary controller.
Devices interface with controller rather than system bus.
Controller reads/write directly to/from memory.
Interrupts CPU when task is done or problem encountered.
next