06-Chap7-Input Output
06-Chap7-Input Output
Input/Output (I/O)
Input/Output (I/O) Architecture
• After Processors & Memory Module, third key
element
• Interface outside world with inside of computer
through system bus
• Why not directly connect peripherals to the
system bus
— Wide variety of peripherals with various methods of
operation, necessary logic impractical
— Speed difference
— Different data format/word length
• Structure
— Interface to CPU and Memory
— Interface to one or more peripherals
Generic Model of I/O Module
Input/Output Problems
• Wide variety of peripherals
• Delivering different amounts of data
— At different speeds
— In different formats
• Almost all of them slower than CPU and
RAM
• Solution
— Need I/O modules
External Devices
• External Device = Peripherals
• Three categories
— Human readable
– Screen, printer, keyboard
— Machine readable
– Suitable for communication with equipment e.g.?
— Communication
– Suitable for communication with remote devices
e.g.?
External Device Block Diagram
I/O Module Function
• Control & Timing
• CPU Communication
• Device Communication
• Data Buffering
• Error Detection
Control & Timing
• Internal resources are shared – thus I/O include
control & timing to coordinate flow of data b/w recourses/devices
• Isolated I/O
— Separate address spaces 10 bit address line can now
support 1024 memory location and 1024 devices
— Need I/O or memory select lines to differentiate if
this instruction (Load AC 517) is for memory or I/O device
— Special commands for I/O
— Limited instruction set
Memory Mapped and Isolated I/O (3/3)
Interrupt Driven I/O
• Overcomes CPU waiting
• No repeated CPU checking of device
• I/O module interrupts when ready
Interrupt Driven I/O
Basic Operation
• How it works? Let’s see it from I/O module point of view:
— I/O recieves read command from CPU
— I/O module gets data from peripheral whilst
CPU does other work
— I/O module interrupts CPU
— CPU acknowledges the interrupt
— I/O module transfers data
CPU point of view
• CPU issues read command
• Does other work
• Checks for interrupt at end of each
instruction cycle
• If interrupted:-
— Saves context (registers)
— Processes interrupt
– Fetches data & stores
• Restores context of the paused program
Interrupt Driven I/O Technique for
READ Command
Simple Interrupt
Processing