![Page 1: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/1.jpg)
Computer component :
Input/OutputInput/Output• I/O Modules•External Devices• I/O Modules Function and
Structure• I/O Operation Techniques• I/O Channels and Processors•External Interface
![Page 2: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/2.jpg)
I/O Modules
• The third key element of a computer system.• Each module interfaces to the system bus
and controls one or more peripheral devices.• The reasons to use I/O Module :
– A wide variety of peripherals with various methods of operation
– The difference of data transfer rate– The difference of data formats and word
lengths...
![Page 3: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/3.jpg)
External Devices
• An external device connected to an I/O modules is a peripheral device or a peripheral.
• Three categories of peripheral– Human readable : for user e.g. monitor, printer– Machine readable : for equipment e.g.
magnetic disk and tape system– Communication : for remote devices e.g.
terminal, another computer
![Page 4: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/4.jpg)
Typical I/O Device Data Rates
![Page 5: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/5.jpg)
External Devices• The link is used to exchange
control, status and data between theI/O module and the external device– Data : the form of a set of bits– Status : the state of the device– Control : the function that the device will perform
• Control Logic controls the device’s operation response to direction of I/O module.
• Transducer converts data from electrical to other forms of energy during output and vice versa during input.
ControlfromI/O Module
StatustoI/O Module
Data (bits)to and fromI/O Module
Buffer
Transducer
Control
Logic
Data (Device-unique)to and fromEnvironment
An External Device
![Page 6: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/6.jpg)
I/O Modules
The two major functions• Interface to CPU and memory
via the system bus• Interface to one or more
peripheral devices by data links
Address Line
Data Line
System Bus
I/O
Module Links to Peripheral Devices
Control Line
Generic Model of an I/O Module
![Page 7: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/7.jpg)
I/O Modules Function
• Control and timing • Processor communication• Device communication• Data buffering• Error detection
![Page 8: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/8.jpg)
Control and Timing• To coordinate the flow of traffic between internal resources
and external devices. For example, the control of the transfer data from an external device to CPU involving the followings steps:1. CPU interrogates the I/O module to check the status of the device.2. The I/O module returns the device status.
3. If the device is operational and ready to transmit, CPU requests th e transfers of
data by mean of a command to the I/O module. 4. The I/O module obtains a unit of data from the external device.
5. The data are transferred from the I/O module to CPU
![Page 9: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/9.jpg)
Processor communication• Each of the interactions between the processor and
the I/O module involves one or more bus arbitration• I/O module must communication with the CPU
involving :– Command decoding :accepts command from the CPU
(read,write,seek)– Data : exchanges between the CPU and the I/O module
via the data bus– Status reporting : send status signal (busy, ready, error) – Address recognition : I/O module must recognize one
unique address for each I/O device it controls
![Page 10: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/10.jpg)
Device communication
• I/O module must be able to communication with I/O devices involving commands, status information, and data.
• The transfer rate into and out of memory or CPU is quite high, the rate of peripheral devices is lower.
• I/O module must be able to operate at both device and memory speeds by buffering data in itself.
Data buffering
![Page 11: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/11.jpg)
Error detection
• I/O module is responsible for error detection and reporting errors to the CPU.
• Type of error– mechanical and electrical malfunctions
(e.g.paper jam,bad disk track) – unintentional changes to the bit pattern as it is
transmitted from device to I/O module.• Some form of error-detecting code is used to
detect transmission errors (e.g. the use of a parity bit on each character of data).
![Page 12: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/12.jpg)
I/O Module Structure
Block Diagram of an I/O Module
Data registers
Status/Control registers
I/Ologic
External Device
Interface Logic
External Device
Interface Logic
...
ControlLines
AddressLines
DataLines
Data
StatusControl
Interface toSystem Bus
Interface toExternal Device
Data
StatusControl
![Page 13: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/13.jpg)
I/O Module Structure
• I/O modules vary in complexity and the nu mber of external devices that they control.
• I/O module takes on most of the detailed p - rocessing burden, presenting a high level i
nterface to the CPU is an I/O channel or I/O processor (in mainframes).
• I/O module that is quite primitive and requires detail control is an I/O controller or device controller (in PCs).
![Page 14: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/14.jpg)
I/O Commands and Instructions
• I/O Commands : four types that I/O module may receiv e when it is addressed by a processor:
– Control : used to activate a peripheral and tell it what to do.– Test :used to test varios status condition associated with I/O
module&peripherals– Read : causes the I/O module to obtain data from the periph
eral– Write : causes the I/O module to take data to the peripheral
• I/O Intsructions : to execute, CPU issues an address, sp ecifying the particular I/O module and external device
and I/O command.
![Page 15: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/15.jpg)
I/O Operation Techniques
• Programmed I/O• - Interrupt Driven I/O• Direct Memory Access (DMA)
![Page 16: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/16.jpg)
Programmed I/O
• Data are exchanged between the CPU and the I/O module.
• The CPU executes a program that gives it direct control of the I/O operation.
• When the CPU issues to the I/O modules, it must wait until the I/O operation is complete.
• If the CPU is faster than the I/O module, this is wasteful of CPU time.
![Page 17: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/17.jpg)
Issue read command to I/O module
Read statusof I/O module
Check status
Read word fromI/O module
Write word intomemory
Done?
Yes
No
Ready
Error ConditionNotReady
CPU --> I/O
I/O --> CPU
I/O --> CPU
CPU --> Memory
Programmed I/O Programmed I/O
![Page 18: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/18.jpg)
Interrupt-Driven I/O
• The CPU send START signal to I/O cont roller for start working.
• After send signal, the CPU can continu e their jobs.
• When I/O controller finish work, it sen d interrupt signal to the CPU.
• The CPU suspend their works and load data into memory.
![Page 19: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/19.jpg)
Interrupt-Driven I/O Interrupt-Driven I/O
Issue read command to I/O module
Read statusof I/O module
Check status
Read word fromI/O module
Write word intomemory
Done?
Yes
No
Ready
Error Condition
Do Something Else
CPU --> I/O
I/O --> CPU
I/O --> CPU
CPU --> Memory
Interrupt
![Page 20: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/20.jpg)
Direct Memory Access
• CPU requests to read/write by sent signal to read/write control line.
• The address of the I/O device involved, sent on the data lines.
• The number of words to be read/written, stored in data count register
• The starting location in memory to read/write, sent on the data lines and stored in address regist
er.• When finishing data transfer, it send interrupt sign
al to the CPU.
Data Count
Data Register
Address Register
ControlLogic
Data lines
Address lines DMA Request DMA Acknowledge
InterruptReadWrite
![Page 21: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/21.jpg)
Issue read blockcommand
to DMA module
Read statusof DMA module
Do Something Else
CPU --> DMA
DMA --> CPU
Direct Memory AccessDirect Memory Access
Interrupt
![Page 22: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/22.jpg)
I/O Channel and Processors
• The Evolution of the I/O Function– The CPU directly controls a peripheral device.– A controller or I/O module is added. The CPU uses pro
grammed I/O without interrupt.– Interrupts are employed.– I/O module is given direct access to memory via DMA.– I/O is enchanced to become a processor in itself. (I/O
Channel)– I/O module has a local memory of its own. (I/O Proces
sor)
![Page 23: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/23.jpg)
I/O Channel and Processors
• Characteristics of I/O Channels– I/O channel is able to execute I/O instructions,
completing I/O operations– The CPU initiates an I/O transfer by instructing
the I/O channel to execute a program in memory.• Two types of I/O channel
– A Selector Channel controls one of multiple high-speed devices at any one time.
– A Multiplexor Channel can handle I/O with multiple devices at the same time.
![Page 24: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/24.jpg)
Selector
Channel
Data and Address Channel to Main Memory
Control Signal path to CPU
....I/O Controller
I/O ControllerMultip
lexorChann
el
To Memory
To CPU. . . .
I/O ControllerI/O ControllerI/O
ControllerI/O Controller Two types of I/O channel Two types of I/O channel
![Page 25: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/25.jpg)
The External Interface
• Type of interfaces between a peripheral and I/O module– Parallel interface : multiple lines
connecting the I/O module and the peripheral, multiple bits are transferred simultaneously.
– Serial interface : only one line used to transmit data and bits must be transmitted one at a time.Buffer
I/O Moduleto system bus
to peripheral
Parallel I/O
Buffer
I/O Moduleto system bus
to peripheral
Serial I/O
![Page 26: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/26.jpg)
The External Interface
• Type of interfaces between external device s and I/O module– - - Point to point interface provides a ded
icated line. (e.g. keyboard, printer, extern -al modem) : EIA 323
– Multipoint interfaces are in effect exter nal buses, and exhibit the same type of lo gic as the buses. (e.g. external mass stor
age, multimedia devices) : SCSI, FireWire
![Page 27: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/27.jpg)
The External Interface
• Small Computer System Interface– SCSI is the standard (multipoint) interface for CD-
ROM drives, audio equipment and external mass storage devices.
– Uses a parallel interface with 8,16,32 data lines.– All devices are daisy chained together. – Each SCSI device has 2 connectors for input and
output.– All devices function independently and can
exchange data with each other as well as with the host system.
![Page 28: Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and](https://reader036.vdocuments.us/reader036/viewer/2022081417/56649f0e5503460f94c22c64/html5/thumbnails/28.jpg)
The External Interface
• FireWire– Serial Interface which could use with digit
al camera, VCRs, televisions– High speed, low cost, easy to implement– - Mouse, Laser printer, SCSI External disk d
rives, sound, LAN card, etc. could be rep laced with single simple connector single simple connector
– - Daisy chain up to 63 devices connected o ff single port
IEEE-1394