INPUTOUTPUT MODULE - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

INPUTOUTPUT MODULE

Description:

Tailored to specific I/O device and its interface requirements ... To buffer data coming from MM to match the rate of the peripheral. Error detection ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 24
Provided by: kus2
Category:

less

Transcript and Presenter's Notes

Title: INPUTOUTPUT MODULE


1
CHAPTER 7
  • INPUT/OUTPUT MODULE

2
Chapter Outline
  • Introduction
  • External devices
  • I/O Module
  • I/O Techniques
  • Programmed I/O
  • Interrupt Driven
  • Direct Memory Access (DMA)

3
7.1 Introduction
  • External devices are NOT generally connected
    directly into the bus structure of the computer
  • Wide variety of devices require different logic
    interfaces
  • Mismatch of data rates
  • Different data representations
  • The I/O Module
  • Provides a standard interface to the CPU and the
    bus
  • Tailored to specific I/O device and its interface
    requirements
  • Relieves the CPU of the management of the I/O
    devices

7-1
4
Generic Model of I/O Module
5
7.2 External Devices
  • There are 3 types of external devices-
  • Human-readable
  • To communicate with users e.g .
  • Machine-readable
  • To communicate with the computer devices e.g
  • Communication
  • As interface to the remote devices e.g ..

7-2
6
  • Interface to I/O module form of
  • Control signals
  • Status signals
  • Data bits

Figure 1 Block Diagram of External Device
7
7.3 Input/Output Module
  • I/O modules have 5 major functions -
  • Control timing
  • Coordinate the flow of traffic between internal
    resources external devices
  • Processor communication
  • Communicate with the CPU
  • E.g .
  • Device Communication
  • To communicate status information, commands and
    data with devices

7-3
8
  • Data buffering
  • To buffer data coming from MM to match the rate
    of the peripheral
  • Error detection
  • To detect and report errors to the processor
  • E.g paper jam, bad disk track

7-4
9
Figure 2 Block Diagram of an I/O Module
7-5
10
7.4 Input /Output Techniques
  • 3 commonly used techniques are-
  • Programmed I/O
  • Interrupt Driven
  • Direct Memory Access (DMA)

7-6
11
7.4.1 Programmed I/O
  • I/O operation in which CPU issues the I/O command
    to the I/O module
  • CPU is in direct control of the operation
  • CPU waits until the I/O operation is completed
    before it can perform other tasks
  • Completion is indicated by a change in the module
    status bits
  • CPU must periodically poll the module to check
    its status

7-7
12
  • As a result of the speed difference between CPU
    and the peripheral devices, programmed I/O wastes
    an enormous amount of CPU processing power
  • Very inefficient
  • CPU is slowed to the speed of the peripheral
  • Advantages-
  • Simple to implement
  • Requires very little special software or hardware

7-8
13
7-9
14
7.4.2 Interrupt-driven I/O
  • To reduce the time spent on I/O operations, the
    CPU can use an interrupt-driven approach
  • CPU issues I/O command to the module
  • CPU continues with its other tasks while the
    module perform its task
  • Module signals CPU when I/O operation is finished
    (the interrupt)

7-10
15
  • CPU responds to the interrupt by executing an
    interrupt service routine (ISR) and then
    continues on with its primary task
  • CPU recognizes and responds to interrupts at the
    end of an instruction execution cycle

7-11
16
7-12
17
7.4.3 Direct Memory Access
  • Both programmed and interrupt-driven I/O require
    the continued involvement of the CPU in ongoing
    I/O operations
  • Direct memory accessing takes the CPU out of the
    task except for initialization of the operation
  • Large amount of data can be transferred between
    MM and the devices without severely impacting CPU
    performance

7-13
18
  • CPU initializes the DMA module
  • R/W operation defined
  • I/O device involved
  • Starting address of memory block
  • Number of words to be transferred
  • CPU continues with other work

7-14
19
7-15
20
  • DMA operates by stealing bus cycles from the
    CPU
  • Uses the bus when CPU is not using it no impact
    on the CPU performance
  • Accesses memory to retrieve a data word
  • Forwards the word to the I/O devices

7-16
21
DMA Configurations (1)
  • Single Bus, Detached DMA controller
  • Each transfer uses bus twice
  • I/O to DMA then DMA to memory
  • CPU is suspended twice

22
DMA Configurations (2)
  • Single Bus, Integrated DMA controller
  • Controller may support gt1 device
  • Each transfer uses bus once
  • DMA to memory
  • CPU is suspended once

23
DMA Configurations (3)
  • Separate I/O Bus
  • Bus supports all DMA enabled devices
  • Each transfer uses bus once
  • DMA to memory
  • CPU is suspended once
Write a Comment
User Comments (0)
About PowerShow.com