Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

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 Processors External Interface

2 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...

3 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

4 Typical I/O Device Data Rates

5 External Devices The link is used to exchange control, status and data between the I/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. Control from I/O Module Status to I/O Module Data (bits) to and from I/O Modul e Buffer Transd ucer Contr ol Logic Data (Device- unique) to and from Environ ment An External Device

6 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 Addres s Line Data Line Syste m Bus I/O Module Links to Periph eral Device s Control Line Generic Model of an I/O Module

7 I/O Modules Function Control and timing Processor communication Device communication Data buffering Error detection

8 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 the 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

9 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

10 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

11 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).

12 I/O Module Structure Block Diagram of an I/O Module Data registers Status/Control registers I/O logic External Device Interface Logic External Device Interface Logic...... Control Lines Address Lines Data Lines Data Status Control Interface to System Bus Interface to External Device Data Status Control

13 I/O Module Structure I/O modules vary in complexity and the number of external devices that they control. I/O module takes on most of the detailed processing burden, presenting a high-level interface 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).

14 I/O Commands and Instructions I/O Commands : four types that I/O module may receive 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 peripheral –Write : causes the I/O module to take data to the peripheral I/O Intsructions : to execute, CPU issues an address, specifying the particular I/O module and external device and I/O command.

15 I/O Operation Techniques Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA)

16 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.

17 Issue read command to I/O module Read status of I/O module Check status Read word from I/O module Write word into memory Done? Yes No Ready Error Condition Not Ready CPU --> I/O I/O --> CPU CPU --> Memory Programmed I/O Programmed I/O

18 Interrupt-Driven I/O The CPU send START signal to I/O controller for start working. After send signal, the CPU can continue their jobs. When I/O controller finish work, it send interrupt signal to the CPU. The CPU suspend their works and load data into memory.

19 Interrupt-Driven I/O Interrupt-Driven I/O Issue read command to I/O module Read status of I/O module Check status Read word from I/O module Write word into memory Done? Yes No Ready Error Condition Do Something Else CPU --> I/O I/O --> CPU CPU --> Memory Interrupt

20 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 register. When finishing data transfer, it send interrupt signal to the CPU. Data Count Data Register Address Register Control Logic Data lines Address lines DMA Request DMA Acknowledge Interrupt Read Write

21 Issue read block command to DMA module Read status of DMA module Do Something Else CPU --> DMA DMA --> CPU Direct Memory Access Interrupt

22 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 programmed 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 Processor)

23 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.

24 Select or Chann el Data and Address Channel to Main Memory Control Signal path to CPU.... I/O Controlle r Multipl exor Chann el To Memory To CPU.. I/O Controll er Two types of I/O channel

25 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 Module to syst em bus to perip heral Paralle l I/O Buffer I/O Module to syst em bus to perip heral Serial I/O

26 The External Interface Type of interfaces between external devices and I/O module –Point-to-point interface provides a dedicated line. (e.g. keyboard, printer, external modem) : EIA-323 –Multipoint interfaces are in effect external buses, and exhibit the same type of logic as the buses. (e.g. external mass storage, multimedia devices) : SCSI, FireWire

27 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.

28 The External Interface FireWire –Serial Interface which could use with digital camera, VCRs, televisions –High speed, low cost, easy to implement single simple connector –Mouse, Laser printer, SCSI-External disk drives, sound, LAN card, etc. could be replaced with single simple connector –Daisy-chain up to 63 devices connected off single port IEEE-1394


Download ppt "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."

Similar presentations


Ads by Google