Professional Documents
Culture Documents
Input Output Organization
Input Output Organization
Input Output Organization
Contents
I/O Organization
Input-Output Interface
Asynchronous Data Transfer
Asynchronous Serial Transmission
Modes of Data Transfer
Programmed I/O
Interrupt-Initiated I/O
Direct Memory Access (DMA)
I/O Organization
Control
Keyboard
and Printer Magnetic
display disk
terminal
Many computers use one common bus to transfer information between memory
or I/O and the CPU.
The distinction between a memory transfer and I/O transfer is made through
separate read and write lines.
The CPU specifies whether the address on the address lines is for a memory
word or for an interface register by enabling one of two possible read or write
lines.
The I/O read and I/O writes control lines are enabled during an I/O transfer. The
memory read and memory write control lines are enabled during a memory
transfer.
This configuration isolates all I/O interface addresses from the address
assigned to memory and is referred to as the isolated I/O method for assigning
addresses in a common bus.
ISOLATED I/O
In the isolated I/O configuration, the CPU has distinct input and output
instructions and each of these instructions are associated with the address of
an interface register.
When the CPU fetches and decodes the operation code of an input or output
instruction, it places the address associated with the instruction into the
common address lines.
At the same time, it enables the I/O read (for input) or I/O write (for output)
control line.
This informs the external components that are attached to the common bus
that the address in the address lines is for an interface register and not for a
memory word.
This is the case in computers that employ only one set of read and write signals and
do not distinguish between memory and I/O addresses.
The computer treats an interface register as being part of the memory system.
The assigned addresses for interface registers cannot be used for memory words,
which reduce the memory address( range available).
In memory mapped I/O organization, there are no specific inputs or output instructions.
The CPU can manipulate I/O data residing in interface registers with the same
instructions that are used to manipulate memory words.
Typically, a segment of the total address space is reserved for interface registers, but in
general, they can be located at any address as long as there is not also a memory word
that responds to the same address.
It allows the computer to use the same instructions for either input-output transfers or
for memory transfers.
Types of Data Transfer
Transfer of data is required between CPU and peripherals or
memory or sometimes between any two devices or units of
your computer system. To transfer a data from one unit to
another one should be sure that both units have proper
connection and at the time of data transfer the receiving unit is
not busy. This data transfer with the computer is Internal
Operation.
Types of Data Transfer
All the internal operations in a digital system are
synchronized by means of clock pulses supplied by a
common clock pulse Generator. The data transfer can
be
i. Synchronous or
ii. Asynchronous
Asynchronous Data Transfer
This Scheme is used when speed of I/O devices do not
match with microprocessor, and timing characteristics of I/O
devices is not predictable. In this method, process initiates the
device and check its status. As a result, CPU has to wait till
I/O device is ready to transfer data. When device is ready CPU
issues instruction for I/O transfer. In this method two types of
techniques are used based on signals before data transfer.
i. Strobe Control
ii. Handshaking
Strobe Signal
Data Bus
Source Destination
Unit Strobe Unit
Data
Valid data
Strobe
The timing diagram fig. (b) the source unit first places the data
on the data bus. The information on the data bus and strobe signal
remain in the active state to allow the destination unit to receive the
data.
Data Transfer Initiated by Destination Unit
Data Bus
Source Destination
Unit Strobe Unit
Data
Valid data
Strobe
The data must be valid and remain in the bus long enough for
the destination unit to accept it. When accepted the destination unit
then disables the strobe and the source unit removes the data from
the bus.
Disadvantage of Strobe Signal
The disadvantage of the strobe method is that, the
source unit initiates the transfer has no way of
knowing whether the destination unit has actually
received the data item that was places in the bus.
Similarly, a destination unit that initiates the transfer
has no way of knowing whether the source unit has
actually placed the data on bus. The Handshaking
method solves this problem.
Handshaking
One control line is in the same direction as the data flows in the bus
from the source to destination. It is used by source unit to inform
the destination unit whether there a valid data in the bus. The
other control line is in the other direction from the destination to the
source. It is used by the destination unit to inform the source
whether it can accept the data. The sequence of control during the
transfer depends on the unit that initiates the transfer.
Source Initiated Transfer using Handshaking
The sequence of events shows four possible states that the
system can be at any given time. The source unit initiates
the transfer by placing the data on the bus and enabling
its data valid signal. The data accepted signal is activated
by the destination unit after it accepts the data from the
bus. The source unit then disables its data accepted
signal and the system goes into its initial state.
Handshaking
Data Bus
Destination Unit
Source unit
Ready to accept data.
Place the data on bus. Enable ready for data.
Enable data Valid.
ii. Stop Bit- Last bit, called stop bit is always one and used to
indicate end of characters. Stop bit is always in the 1- state and
frame the end of the characters to signify the idle or wait state.
iii. Character Bit- Bits in between the start bit and the stop bit
are known as character bits. The character bits always follow
the start bit.
Asynchronous Serial Transmission
0 1 1 0 0 0 1 0 1
Start Stop
bit Character bits bits
The transmitter register accepts a data byte from CPU through the
data bus and transferred to a shift register for serial transmission.
CPU can select the receiver register to read the byte through the
data bus. Data in the status register is used for input and output
First In First Out Buffer (FIFO)
Software method
One common branch address for all interrupts
Program begins at branch address and polls the
interrupt sources in sequence.
Initial service routine for all interrupt tests the interrupt
source in sequence and branch to one of many
possible routines.
Time may exceeds
Priority Interrupts
A Priority interrupt is a system that
establishes a priority over the various
resources to determined which condition is
to be served first when two or more
request arrives simultaneously.
Types: hardware methods
Daisy Chaining PI
Parallel PI
Daisy Chaining PI
Direct Memory Access (DMA)
Bus Grant BG
WR Write
i. DMA Burst