Io ORGANIZATION
Io ORGANIZATION
I/O Bus
Data
Processor Address
Control
Keyboard,
Magnetic Magnetic
Display Printer
Disk Tape
Terminal
INPUT- OUTPUT INTERFACE
I/O Bus
I/O Bus and Interface Modules Data
Processor
Address
Control
I/O bus consists of:
Interface Interface Interface Interface
•Data lines.
•Address lines. Keyboard,
Magnetic Magnetic
Display Printer
Disk Tape
•Control lines. Terminal
In case of 1 common bus with common control lines, the configuration is
said to be “memory-mapped I/O”.
The Interface registers are treated as a part of the memory system.
Same instruction set is used to access both the interface registers and the
memory.
ASYNCHRONOUS DATA TRANSFER
Strobe pulse supplied by one of the units indicates the other unit when the
transfer has to occur.
Strobe may be activated by either source or the destination unit.
1011010 1011010
Source Data Bus Destination Source Data Bus Destination
Unit Unit Unit Unit
Strobe Strobe
Strobe Strobe
Fig: Source initiated strobe for data transfer Fig: Destination initiated strobe for data transfer
ASYNCHRONOUS DATA TRANSFER
Handshaking
In strobe method, the source unit that initiates the transfer has no way of
knowing whether the destination unit has received the data from the data bus.
Similarly, the destination unit that initiates the transfer has no way of
knowing whether the source unit has placed the data on the bus.
Two-wired handshaking solve the above problem, and the principle is,
•One control line is used by the source unit to inform the destination unit
whether there are valid data in the bus.
•The other control line is used by the destination unit to inform the source
whether it can accept data.
ASYNCHRONOUS DATA TRANSFER
Handshaking
1011010
Data Bus Fig: Source initiated transfer using
Source Destination handshaking
Data Valid
Unit Unit
Data Accepted
Sequence of events
Block diagram
Source Destination
Place data on bus.
Enable data valid
Data bus Valid Data
Data transfer between the CPU and I/O device is initiated by the CPU.
The readiness of the I/O device can be determined from an interrupt signal.
All the I/O devices are able to originate the interrupt request.
Several I/O devices may request the interrupt simultaneously, and the task
of the system is to identify the source of the interrupt request and to decide
which device to service first.
A priority interrupt is a system that establishes a priority over the various
sources to determine which condition is to be serviced first when two or more
request arrive simultaneously.
PRIORITY INTERRUPT
Introduction
Devices with high transfer rate such as magnetic disks are given high
priority.
Devices with low transfer rate such as keyboards are given low priority.
High priority devices are serviced first.
A polling procedure is used to identify the highest priority source by
software means.
The highest priority source is tested first, and if its interrupt signal is on,
control branches to a service routine for this resource.
Otherwise, the next lower priority source is tested, and so on.
Disadvantage of the above software method is, the time required to poll
them can exceed the time available to service the I/O device.
PRIORITY INTERRUPT
Introduction
Interrupt Request
INT
INTACK
Interrupt Acknowledge
CPU
request” line.
Interrupt Request INT
INTACK
Interrupt Acknowledge
CPU
PRIORITY INTERRUPT
Daisy-Chaining Priority (Continued…)
PO output. INTACK
Interrupt Acknowledge
CPU
PRIORITY INTERRUPT
Daisy-Chaining Priority (Continued…)
It then proceeds to insert its own interrupt vector address (VAD) into the
data bus for the CPU to use during the interrupt cycle.
Processor Data Bus
To next
Device 1 Device 2 Device 3 device
1 1 0 0 0
PI PO PI PO PI PO
Interrupt Request
INT
INTACK
Interrupt Acknowledge
CPU
PRIORITY INTERRUPT
Parallel Priority Interrupt
Parallel priority interrupt method uses a register whose bits are set
separately by the interrupt signal from each device.
Priority is established according to the position of bits in the register.
A “Mask register” controls the status of each interrupt request.
The mask register can be programmed to disable lower-priority interrupt
while a higher-priority device is being serviced. It can also provide a facility
that allows a high-priority device to interrupt the CPU while a lower-priority
device is being serviced.
An interrupt is recognized only if its corresponding mask bit is set to 1 by the
program.
The priority encoder generates 2 bits of vector address, which is transferred
to the CPU.
DIRECT MEMORY ACCESS (DMA)
Data transfer between the CPU and I/O device is initiated by the CPU.
The readiness of the I/O device can be determined from an interrupt signal.
All the I/O devices are able to originate the interrupt request.
Several I/O devices may request the interrupt simultaneously, and the task
of the system is to identify the source of the interrupt request and to decide
which device to service first.
A priority interrupt is a system that establishes a priority over the various
sources to determine which condition is to be serviced first when two or more
request arrive simultaneously.
DIRECT MEMORY ACCESS (DMA)
Introduction