COA_Unit-4_notes
COA_Unit-4_notes
Input/Output Organization
Bus Structure
A single-bus structure
• The bus consists of three sets of lines used to carry address, data,
and control signals.
• I/O device interfaces are connected to these lines, for an input
device.
• Each I/O device is assigned a unique set of addresses for the
registers in its interface.
• When the processor places a particular address on the address lines,
it is examined by the address decoders of all devices on the bus.
• The device that recognizes this address responds to the commands
issued on the control lines.
• The processor uses the control lines to request either a Read or a
Write operation, and the requested data are transferred over the data
lines.
• Any machine instruction that can access memory can be used to
transfer data to or from an I/O device.
For example,
• The address decoder, the data and status registers, and the control
circuitry required to coordinate I/O transfers constitute the device’s
interface circuit.
Bus Operation
• A bus requires a set of rules, often called a bus protocol, that govern
how the bus is used by various devices.
• The bus protocol determines when a device may place information
on the bus, when it may load the data on the bus into one of its
registers, and so on.
• These rules are implemented by control signals that indicate what
and when actions are to be taken.
• One control line, usually labeled R/W, specifies whether a Read or
a Write operation is to be performed.
• When several data sizes are possible, such as byte, half word, or
word, the required size is indicated by other control lines.
• The bus control lines also carry timing information.
• They specify the times at which the processor and the I/O devices
may place data on or receive data from the data lines.
• In any data transfer operation, one device plays the role of a master.
This is the device that initiates data transfers by issuing Read or
Write commands on the bus.
• Normally, the processor acts as the master, but other devices may
also become masters .
• At the end of the clock cycle, at time t2, the master loads the data
on the data lines into one of its registers.
• The master places the output data on the data lines when it
transmits the address and command information.
• At time t2, the addressed device loads the data into its data
register.
The exact times at which signals change state are somewhat different
from those shown, because of propagation delays on bus wires and in
the circuits of the devices.
• However, these signals do not actually appear on the bus until tAM,
largely due to the delay in the electronic circuit output from the
master to the bus lines. A short while later, at tAS, the signals reach
the slave.
• The slave decodes the address, and at t1 sends the requested data.
• Here again, the data signals do not appear on the bus until tDS.
They travel toward the master and arrive at tDM.
• At t2, the master loads the data into its register. Hence the period t2
− tDM must be greater than the setup time of that register.
• The data must continue to be valid after t2 for a period equal to the
hold time requirement of the register
Asynchronous Bus
• In this case, the master places the output data on the data lines at the
same time that it transmits the address and command information.
• The selected slave loads the data into its data register when it
receives the Master-ready signal and indicates that it has done so by
setting the Slave-ready signal to 1.
• The device that initiates data transfer requests on the bus is the bus
master.
• When multiple requests arrive at the same time, the arbiter selects
one request and grants the bus to the corresponding device.
• For some devices, a delay in gaining access to the bus may lead to
an error. Such devices must be given high priority.
• If there is no particular urgency among requests, the arbiter may
grant the bus using a simple round-robin scheme.
Bus arbitration.
• There are two Bus-request lines, BR1and BR2, and two Bus-grant
lines, BG1and BG2, connecting the arbiter to the masters.
• By that time, both masters 1 and 3 have activated their request lines.
• On one side of the interface are the bus lines for address, data, and
control. On the other side are the connections needed to transfer
data between the interface and the I/O device. This side is called a
port, and it can be either a parallel or a serial port.
• The status flag is cleared to 0 when the processor reads the contents
of the KBD_DATA register.
•The bus has one other control line, R/W, which indicates a Read
operation when equal to 1.
Output Interface
• When the I/O routine checks DOUT and finds it equal to 1, it sends
a character to DISP_DATA.
• This clears the DOUT flag to 0 and sets the New-data signal to 1.
For example, a memory key that has a USB connector can be used
with any computer that has a USB port.
USB Architecture
• Like the USB, it uses differential point to- point serial links.
• The bridge has a special port for connecting the computer’s main
memory.
• It may also have another special high speed port for connecting
graphics devices.
• The bridge translates and relays commands and responses from one
bus to the other and transfers data between them.
For example,
• when the processor sends a Read request to an I/O device, the bridge
forwards the command and address to the PCI bus. When the bridge
receives the device’s response, it forwards the data to the processor
using the processor bus
• I/O devices are connected to the PCI bus, possibly through ports that
use standards such as Ethernet, USB, SATA, SCSI, or SAS.
• The bus master, which is the device that initiates data transfers by
issuing Read and Write commands, is called the initiator in PCI
terminology.
• The main bus signals used for transferring data are listed in a Table
Shown in next slide
• All signal transitions are triggered by the rising edge of the clock..
• The C/BE# lines, which are used to send a bus command in clock
cycle 1, are used for a different purpose during the rest of the
transaction.
• Each of these four lines is associated with one byte on the AD lines.
The initiator asserts one or more of the C/BE# lines to indicate which
byte lines are to be used for transferring data.
• The initiator uses the FRAME# signal to indicate the duration of the
burst. It deactivates this signal during the second-last word of the
transfer. The initiator maintains FRAME# in the asserted state until
clock cycle 5, the cycle in which it receives the third word.
• In response, the target sends one more word in clock cycle 6, then
stops.
• After sending the fourth word, the target deactivates TRDY# and
DEVSEL# and disconnects its drivers on the AD lines.
SCSI Bus
6. The SCSI controller transfers the requested data to the main memory
and sends an interrupt to the processor indicating that the data are
now available.
PCI Express
• The root node of the tree, called the Root complex, is connected to
the processor bus. The Root complex has a special port to connect
the main memory.
• All other connections emanating from the Root complex are serial
links to I/O devices.
• A system which has the same network latency for all accesses from
the processors to the memory modules is called a Uniform Memory
Access (UMA) multiprocessor.
A NUMA multiprocessor
• For better performance, it is desirable to place a memory module
close to each processor.
• A bus is a set of lines (wires) that provide a single shared path for
information transfer.
• Each internal node of the mesh has four connections, one to each
of its horizontal and vertical neighbors.