0% found this document useful (0 votes)
102 views

COA Lecture 22 Io Module PDF

The I/O module provides an interface between the computer's system bus and external peripheral devices. It handles communication with peripherals by controlling data, address, and status lines. This allows different types of peripherals to be connected without impacting the system bus. The I/O module buffers data to resolve speed mismatches and detects errors during transmission.

Uploaded by

A3 Aashu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

COA Lecture 22 Io Module PDF

The I/O module provides an interface between the computer's system bus and external peripheral devices. It handles communication with peripherals by controlling data, address, and status lines. This allows different types of peripherals to be connected without impacting the system bus. The I/O module buffers data to resolve speed mismatches and detects errors during transmission.

Uploaded by

A3 Aashu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Input/Output Module

interface to the outside world.

This architecture provides a systematic means


of controlling interaction with the outside
world and provides the operating system with
the information it needs to manage I/O activity
effectively.
Address Lines

System
Data Lines Bus

Control Lines

I/O Module

Links to
peripheral
devices

Figure 7.1 Generic Model of an I/O Module


What is the use of I/O Module?
why one does not connect peripherals directly to the system bus.The
reasons are as follows:
1. There are a wide variety of peripherals with various methods of
operation. It would be impractical to incorporate the necessary
logic within the processor to control a range of devices.
2. The data transfer rate of peripherals is often much slower than that
of the memory or processor. Thus, it is impractical to use the high-
speed system bus to communicate directly with a peripheral.
3. On the other hand, the data transfer rate of some peripherals is
faster than that of the memory or processor. Again, the mismatch
would lead to inefficiencies if not managed properly.
4. Peripherals often use different data formats and word lengths than
the computer to which they are attached.
External Devices

Provide a means of exchanging data Three categories:


between the external environment and the Human readable
computer Suitable for communicating
Attach to the computer by a link to an I/O with the computer user
module Video display terminals (VDTs),
The link is used to exchange control, printers
status, and data between the I/O Machine readable
module and the external device Suitable for communicating
Peripheral device with equipment
An external device connected to an I/O Magnetic disk and tape systems,
module sensors and actuators
Communication
Suitable for communicating
with remote devices such as a
terminal, a machine readable
device, or another computer
Control Status Data bits
signals from signals to to and from
I/O module I/O module I/O module

Control Buffer
Logic
Transducer

Data (device-unique)
to and from
environment

Figure 7.2 Block Diagram of an External Device


Most common means of
Keyboard/Monitor computer/user interaction
User provides input through the
International Reference Alphabet keyboard
The monitor displays data provided by
(IRA)
the computer
Basic unit of exchange is the character
Associated with each character is a code
Each character in this code is represented by Keyboard Codes
a unique 7-bit binary code
o 128 different characters can be When the user depresses a key it generates
represented an electronic signal that is interpreted by the
Characters are of two types: transducer in the keyboard and translated into
Printable the bit pattern of the corresponding IRA code
o Alphabetic, numeric, and special
characters that can be printed on paper or This bit pattern is transmitted to the I/O
displayed on a screen module in the computer
Control
On output, IRA code characters are
o Have to do with controlling the printing
transmitted to an external device from the I/O
or displaying of characters
module
o Example is carriage return
o Other control characters are concerned
The transducer interprets the code and sends
with communications procedures
the required electronic signals to the output
device either to display the indicated
character or perform the requested control
function
Interface to Interface to
System Bus External Device

Data
Data Registers External
Device
Data Status
Interface
Lines
Logic
Status/Control Registers Control

Address
Lines Data
External
I/O Device
Logic Status
Interface
Control Logic
Lines Control

Figure 7.3 Block Diagram of an I/O Module


The major functions for an I/O module fall into
the following categories:

Control and timing


Coordinates the flow of traffic between internal resources and external devices

Processor communication
Involves command decoding, data, status reporting, address recognition

Device communication
Involves commands, status information, and data

Data buffering
Performs the needed buffering operation to balance device and memory speeds

Error detection
Detects and reports transmission errors
Control and timing
For example, the control of the transfer of data from an
external device to the processor might involve the following
sequence of steps:
1. The processor interrogates the I/O module to check the
status of the attached device.
2. The I/O module returns the device status.
3. If the device is operational and ready to transmit, the
processor requests the transfer of data, by means of a
command to the I/O module.
4. The I/O module obtains a unit of data (e.g., 8 or 16 bits)
from the external device.
5. The data are transferred from the I/O module to the
processor.
Processor communication
Processor communication involves the following:

Command decoding: The I/O module accepts commands from the


processor, typically sent as signals on the control bus.
Data: Data are exchanged between the processor and the I/O
module over the data bus.
Status reporting: Because peripherals are so slow, it is important to
know the status of the I/O module. For example, if an I/O module is
asked to send data to the processor (read), it may not be ready to do
so because it is still working on the previous I/O command. This fact
can be reported with a status signal. Common status signals are
BUSY and READY.
Address recognition: Just as each word of memory has an address,
so does each I/O device. Thus, an I/O module must recognize one
unique address for each peripheral it controls.
Other functions
On the other side, the I/O module must be able to perform
device communication. This communication involves
commands, status information, and data.
An essential task of an I/O module is data buffering. The
transfer rate into and out of main memory or the processor is
quite high, the rate is orders of magnitude lower for many
peripheral devices and covers a wide range. Data coming from
main memory are sent to an I/O module in a rapid burst. The
data are buffered in the I/O module and then sent to the
peripheral device at its data rate. In the opposite direction, data
are buffered so as not to tie up the memory in a slow transfer
operation. Thus, the I/O module must be able to operate at
both device and memory speeds.
Other functions
Finally, an I/O module is often responsible for error
detection and for subsequently reporting errors to the
processor.
One class of errors includes mechanical and electrical
malfunctions reported by the device (e.g., paper jam,
bad disk track).
Another class consists of unintentional changes to the
bit pattern as it is transmitted from device to I/O
module. Some form of error-detecting code is often
used to detect transmission errors. A simple example is
the use of a parity bit on each character of data.
Programmed I/O
Three techniques are possible for I/O
operations:
Programmed I/O
Data are exchanged between the processor and the I/O module
Processor executes a program that gives it direct control of the I/O operation
When the processor issues a command it must wait until the I/O operation is
complete
If the processor is faster than the I/O module this is wasteful of processor time
Interrupt-driven I/O
Processor issues an I/O command, continues to execute other instructions, and
is interrupted by the I/O module when the latter has completed its work
Direct memory access (DMA)
The I/O module and main memory exchange data directly without processor
involvement
Table 7.1
I/O Techniques

No Interrupts Use of Interrupts

I/O-to-memory transfer Programmed I/O Interrupt-driven I/O


through processor

Direct I/O-to-memory Direct memory access (DMA)


transfer
I/O Commands
There are four types of I/O commands that an I/O module may
receive when it is addressed by a processor:
1) Control
- used to activate a peripheral and tell it what to do
2) Test
- used to test various status conditions associated with an I/O module
and its peripherals
3) Read
- causes the I/O module to obtain an item of data from the peripheral
and place it in an internal buffer
4) Write
- causes the I/O module to take an item of data from the data bus and
subsequently transmit that data item to the peripheral
Thank you for your listening

You might also like