I/O Module
I/O module is intermediate between I/O devices and CPU. System buses are connected to the one end of I/O module and other end is connected to the number of I/O devices. It used to exchange information between I/O devices and CPU. I/O devices cannot be directly connected to the system buses; they are connected to the system buses through module.
There are several reasons for not connecting I/O devices directly to the system buses and they are as follow:
Varity of I/O devices are available with different operation method. It was not possible to develop operation logic of each I/O devices in the CPU itself.
The I/O devices are much slower than that the CPU. Hence it is not possible to match to match high speed of CPU with speed of I/O devices.
As I/O devices are made with different operation method some of them uses different data formats. It was impractical to integrate each data format in the CPU.
Thus I/O module is used to match speed, operation method and data format between CPU and I/O devices
Functions of I/O Module
The major functions of modules are categorised as follows:
Control and Timing – In some of the I/O operation few resources shared such as CPU and memory because CPU communicates with more than one device at a time. Control and timing function synchronises data flow between I/O devices and internal resources such as memory and CPU.
Processor Communication – I/O module communicates with the CPU and I/O devices. It performs following steps:
Status inquiry of I/O device from I/O module.
I/O module responds back.
If device is ready, CPU gives instruction to I/O module to begin data transfer.
I/O module accepts data from I/O device and transfers it to the CPU.
Device Communication – In addition I/O module communicates with I/O devices.
Features of I/O Module
Data Buffering – As I/O devices are much slower than CPU and memory. In order to maintain speed of data flow between I/O devices and internal resources, I/O module buffers data. Device can access take buffered data any time without holding system bus.
Error Detection – It is built- in feature of I/O module that detects electrical and mechanical errors.
4.3 I/O Module Structure
The I/O module is connects to the rest of computer system through system buses.
Data transferred to and from the module are buffered in one or more data registers. There may be also one or more status registers that provide current status information. A status register may also function as a control register, to accept detailed control information from the processor via a set of control lines. The logic within the module interacts with the processor via a set of control lines. The CPU uses the control lines to issue commands to the I/O module. The module must also be able to recognise and generate address associates with the device it controls. Each I/O module has unique address (Refer to Figure 7.2).
Figure 4.2: General structure of I/O Module
4.4 I/O Technique
It is the technique of communication between memory and I/O devices. I/O techniques are categorised in three types based on how information is transfers between memory and I/O devices that whether it is using CPU interaction or Interrupt interaction.
Types of I/O technique are as follows:
Direct Memory Access (DMA)
4.4.1 Programmed I/O
It involves CPU intervention in communication between CPU and memory. When CPU is executing a program and if encounter an instruction related to I/O operation, CPU executes that instruction by issuing command to I/O module. I/O module will perform the request action and then set the appropriate bits in the I/O status registers (Refer to Figure 4.3). However, this is time consuming process that keeps the CPU busy unnecessary. In this case CPU and memory access the same system bus. The CPU access specific device using two different methods and they are as follows:
Memory mapped I/O – In this technique only single read and write line for memory and I/O module read/write operation. Memory devices and I/O devices are accessed by same instruction. (Refer to Figure 4.3).
Figure 4.3: Memory Ma