I/O modules interface to the system bus or central switch (CPU and Memory), interfaces and controls to one or more peripheral I/O operations are accomplished through a wide assortment of external devices that provide a means of exchanging data between external environment and computer by a link to an I/O module. The link is used to exchange control status and data between I/O module and the external devices.

                               

                                                     Fig: Model of I/O module

  • Peripherals are not directly connected to the system bus instead an I/O module is used which contains logic for performing a communication between the peripherals and the system bus. The reasons due to which peripherals do not directly connected to the system bus are:
    • 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.
    • The data transfer rate of peripherals is often much slower than that of the memory or processor. Thus, it is impractical to use high speed system bus to communicate directly with a peripheral and vice versa.
    • Peripherals often use different data format and word length than the computer to which they are connected.
  • Thus an I/O module is required which performs two major functions.

                o Interface to the processor and memory via the system bus

                o Interface to one or more peripherals by tailored data links

I/O Module Functions


  • The I/O module is a special hardware component interface between the CPU and peripherals to supervise and synchronize all I/O transformation The detailed functions of I/O modules are:

Control & Timing: I/O module includes control and timing to coordinate the flow of traffic between internal resources and external devices. The control of the transfer of data from external devices to processor consists following steps:

  • The processor interrogates the I/O module to check status of the attached device.
  • The I/O module returns the device ststus.
  • If the device is operational and ready to transmit, the processor requests the transfer of data by means of a command to I/O module.
  • The I/O module obtains the unit of data from the external device.
  • The data are transferred from the I/O module to the processor.

Processor Communication: I/O module communicates with the processor which involves:

  • Command decoding: I/O module accepts commands from the processor.
  • Data: Data are exchanged between the processor and I/O module over the bus.
  • Status reporting: Peripherals are too slow and it is important to know the status of I/O module.
  • Address recognition: I/O module must recognize one unique address for each peripheral it controls.

Device Communication: It involves commands, status information and data.

Data Buffering: I/O module must be able to operate at both device and memory speeds. If the I/O device operates at a rate higher than the memory access rate, then the I/O module performs data buffering. If I/O devices rate slower than memory, it buffers data so as not to tie up the memory in slower transfer operation.

Error Detection: I/O module is responsible for error detection such as mechanical and electrical malfunction reported by device e.g. paper jam, bad ink track & unintentional changes to the bit pattern and transmission error.

I/O Module Structure


                                         Fig: Block diagram of I/O Module

  • The I/O bus from the processor is attached to all peripheral interfaces
  • To communicate with the particular devices, the processor places a device address on the address bus.
  • Each interface contains an address decoder that monitors the address line. When the interface detects the particular device address, it activates the path between the data line and devices that it controls.
  • At the same time that the address is made available in the address line, the processor provides a function code in the control way includes control command, output data and input data.

I/O Module Decisions


  • Hide or reveal device properties to CPU
  • Support multiple or single device
  • Control device functions or leave for CPU
  • Also O/S decisions
    • eg. Unix treats everything it can as a file