Chapter 5 IO
Chapter 5 IO
INPUT/OUTPUT
SYSTEMS
Introduction
• I/O Module is the third key element of a
computer system.
• It is the responsibility of the module to control
the external devices and the transfer of data
between those devices and memory and/or
CPU registers
Input/output Problems
• Reasons why peripherals can’t directly connect
to the system bus are:
– Wide variety of peripherals with various
method of operation.
– The data transfer rate is much slower than
memory or CPU.
– Use different data formats and word length.
• Thus Input/output Module is required:
– Interface to CPU and Memory via system bus.
– Interface to one or more peripherals by data
links.
External Devices
• I/O operations are accomplished by external devices that
provide a means of exchanging data between the
external environment and the computer.
• External Devices connected to I/O module are called
peripherals. Three categories are:
Human readable: for communicating with computer
user. Ex. Screen, printer, keyboard
Machine readable: for communicating with (Monitoring
and control) equipments. Ex. Disk drive, sensors.
Communication: for communicating with remote
devices. Ex. Modem, Network Interface Card (NIC)
Control signals
determine the function
that the device will
perform, such as:
Send data to the I/O
module (INPUT or
READ), accept data
from the I/O module
(OUTPUT or WRITE),
Report status, or
Perform some control
function particular to
the device (e.g.,
position a disk head).
Data are in the form of a set of bits to be sent to
or received from the I/O module.
Status signals indicate the state of the device.
Examples are READY/NOT-READY
Control logic controls the device’s operation in
response to direction from the I/O module.
Transducer converts data from electrical to other
forms of energy during output and from other
forms to electrical during input.
Buffer is associated with the transducer to
temporarily hold data being transferred between
the I/O module and the external environment.
I/O Module Functions:
Control & Timing: coordinates the flow of data
between internal resources and external devices
CPU Communication: involves command decoding,
data, status reporting, and address recognition.
Device Communication: involves commands, data, and
status information.
Data Buffering: essential task. Data transfer rate is
quite different. The I/O module operate at both
devices and memory speed.
Error Detection: errors including mechanical and
electrical malfunctions (reported by device) report to
CPU. Ex. Paper jam, bad disk track
I/O Steps
1. Memory-mapped I/O:
a single address space for memory and I/O
device.
CPU treats I/O module as memory locations
and use the same machine instructions.
Ex. With 10 address lines 210 memory
locations and I/O addresses can be supported.
2. Isolated I/O:
I/O address space is isolated from memory.
Bus is equipped with memory read/write and
input/output command lines.
The command line specifies whether the
address refers to a memory location or I/O
device
Full range of address is available for both.
Ex. With 10 address lines, 1024 memory
location and 1024 I/O addresses are supported.
Input Output Techniques
– Interrupt driven