Professional Documents
Culture Documents
Buses
I/O buses
CPU’s internal buses
The rate at which the CPU completes its operations is determined by the bus structure inside
the CPU.
The cost of the CPU increases with the complexity of the bus structure.
Three types of bus structures are typically used:
single-bus,
two-bus, and
three-bus architectures.
CPU’s internal buses
Single-bus organization
Single-bus organization
It slows down the speed of instruction execution even though data may already be in the CPU registers –
two clock cycles may be required to retrieve the operands into the CPU registers from external memory.
To execute an instruction such as ADD between two operands already in register, the control logic in a
single-bus structure must follow a three-step sequence. Single-bus architecture
Each step represents a control state.
Single-bus organization
This architecture perform the addition operation R0 ← R1 + R2 in three clock cycles as follows:
Two-bus architecture
All GPRs are connected to both buses (bus A and bus B) to form a two-bus architecture.
The two operands required by the ALU are, therefore, routed in one clock cycle.
Instruction execution is faster because the ALU does not have to wait for the second operand, unlike the
single-bus architecture.
The information on a bus may be from a
GPR or a special-purpose register.
The special-purpose registers are often
divided into two groups.
• Each group is connected to one of
the buses.
• Data from two special-purpose
registers of the same group cannot
be transferred to the ALU at the
same time.
CPU’s internal buses
Two-bus architecture
The contents of the PC (program counter) are always transferred to the right input of the ALU because it is
connected to bus A.
Similarly, the contents of the special register MBR (memory buffer register, to hold up data retrieved from
external memory) are always transferred to the left input of the ALU because it is connected to bus B.
Three-bus architecture
The performance of a two-bus architecture can be improved by adding a third bus (bus C), at the output
of the ALU.
Buses are shared components that provide the paths for all parts of the computer to
communicate with each other.
They can reduce the complexity of communications between computer components.
They contain conduits for data, “addressing”, and timing/control.
They need a protocol that all users use.
They can provide an easy way to evolve a computer system – add components.
They can be a serious bottleneck if not designed and used appropriately.
As systems grow, they need to evolve hierarchically.
They can be parallel or serial.
They can have data widths larger than the computer word length.
Hierarchical organization of computer buses
The main information that the microprocessor exchanges with the outside world are:
data (operands and results), instructions,
addresses,
control information.
All of these are transmitted as electrical signals (binary encoded) through conductive lines
grouped into the buses.
The assembly of the electrical lines to which the microprocessor, memory and I/O system of a
computer are connected is called: the system bus.
Traditionally, the lines included in the microprocessor external bus are functionally classed into:
data bus;
address bus, and
control bus.
System Bus
The MPU communicates with Memory and I/O using the System Bus:
Address bus
Unidirectional
Memory and I/O Addresses
Data bus
Bidirectional
Transfers Binary Data and Instructions
Control lines
Read and Write timing signals
Hierarchical organization of computer buses
The bus is a communication channel shared over time by several units connected to the bus
lines.
Sharing (multiplexing) over time is required, because only one device can transmit bus data
at a time. For this reason, connecting multiple devices to the same bus system may become
inefficient from the point of view of the communication speed on a single shared bus.
To overcome the overload of the communication channel, and, moreover, to increase its
performance, a hierarchy of several interconnected buses is made.
Hierarchical organization of computer buses
The main reasons for the implementation of several buses, organized as a buses hierarchy, are:
The more devices are connected to a bus, the greater the physical length of the bus (this can
lead to long delays in digital signal transmission with very high clock frequencies).
The more devices are connected to a bus, the longer the data transmission delay due to the
waiting times will be.
The more devices connected to the same bus lines increase the parasitic capacity of each
line, which produces a digital signal integration effect and the possibility that a transmitted
digital signal no longer complies with the HIGH logic level.
Devices connected to a bus have very different operating speeds (for example, think to the
CPU speed compared to the peripheral equipment).
Hierarchical organization of computer buses
In modern digital systems, the transfer between CPUs and memory, respectively I/O devices, is
done through hierarchically organized buses, depending on the speed of devices coupled to each
bus.
There are several organizational variants depending on:
the type of computer (general or specific applications) and
the speed differences between devices.
o Most computers use multiple buses, organized as a hierarchy of buses with different operating
speeds.
I/O devices are connected to the third hierarchical level called (3) extension bus (also called I/O buses). This
one allows to connect a large number and a wide variety of I/O devices to the extension bus (it supports a
wide range of transfer rates) and, at the same time, isolates the processor to-memory traffic from the I/O
traffic.
Hierarchical organization of computer buses
Arbitration
Arbitration of buses is required in all computers,
even in the single-processor systems.
Arbitration
1) In a centralized arbitration system, there is only one
hardware device, called bus controller (arbitrator)
that allocates time for taking control of the buses.
Arbitration
2) For decentralized priority, as the name suggests:
there is no central referee anymore;
each device that can take the control of the buses
contains the logic required to set the priority.
Synchronization
From the point of view of how information is transferred
on the buses, this can be :
synchronous or
asynchronous.
Synchronous buses
On asynchronous busses:
the bus has no system clock;
transfers do not have to be achieved within a fixed
time frame, and
transfer control is done by means of handshaking
signals interchanged between the correspondents.
Asynchronous buses
On asynchronous busses:
the asynchronous data transfers between two
independent units require transmission control
signals between the communicating units to indicate
when the data is available;
even if asynchronous transfers are slower than
synchronous transfers, implementation is often
necessary if the speeds of the two transferring
modules are very different.
Asynchronous transfer
Let’s note the two units that communicate as "source" and The process is called
"destination" of the data without specifying the two asynchronous data transfer, with
interlocutors (e.g., microprocessor, memory, I/O interface). confirmation ("handshaking").
One of the control signals initiates the data transfer, and the
second confirms the reception of the data.
Asynchronous buses
One has to note that the source maintains the active strobe signal
until the destination is able to respond with the Ready signal.
The duration of the active signals may be extended until the slowest of the correspondents can correctly transfer the
data.
Asynchronous buses
Regarding the bus width, the size provided in number of bits indicates
the total number of bits that can be transferred in the time unit:
The higher the number of lines, the higher the speed of information
transfer on the bus, but also the cost of implementation.
Bus standards
First introduced in 1992, the PCI bus is a good example of a system bus that
grew out of the need for standardization.
The PCI follows a sequence of bus standards that were used primarily in
IBM PCs:
the 8-bit XT bus (whose signals closely mimicked those of Intel’s
80x86 processors);
the 16-bit ISA bus (used on the PC At computers);
the extended 32-bit EISA bus;
other buses developed in the eighties, with similar capabilities: the
Microchannel (used in IBM PCs) and the NuBus (used in
Macintosh PCs).
Peripheral Component Interconnect (PCI) Bus
A 4-bit command that accompanies the address identifies which of the three
spaces is being used in a given data transfer operation.
Peripheral Component Interconnect (PCI) Bus
In the signaling convention on the PCI bus one could assume that the master
maintains the address information on the bus until data transfer is completed.
But, this is not necessary:
the address is needed only long enough for the slave to be selected;
the slave can store the address in its internal buffer;
thus, the address is needed on the bus for one clock cycle only, freeing
the address lines to be used for sending data in subsequent clock
cycles.
The result is a significant cost reduction because the number of wires on a
bus is an important cost factor. This approach in used in the PCI bus.
At any given time, one device is the bus master:
it has the right to initiate data transfers by issuing read and write
commands.
a master is called an initiator in PCI terminology;
this is either a processor or a DMA controller.
The addressed device that responds to read and write commands is called a
target.
Peripheral Component Interconnect (PCI) Bus
Device Configuration
Device Configuration
The signals from the CPU interface with its outside can be functionally grouped in 3 types of buses:
1. address bus;
2. data bus;
3. control bus.
Data Bus
The width of the data bus is typically a byte
multiple (d = 8, 16, 32, 64 ... bits).
The d lines of the data bus have both:
the possibility of bidirectional transmission
of the information (with entering into or
output from the CPU), and
the possibility of passing into high-
impedance state (HiZ).
Signals at the CPU interface with the outside world
Data Bus
Data Bus
In order to save pins, some microprocessors
multiplexes the data bus lines over time, so
that address information or control
information can be transmitted in the first
machine cycle of each instruction on the data
bus. In this case:
in the first part of the machine cycle, on
the multiplexed pins there are generated
the address or control signals,
accompanied by an indicator signal on the
control bus that serves to store the
information in processor's external
registers.
The control signal that controls the storage of the address in an external register is called ALE (Address Latch
Enable). Then, for the rest of the instruction cycle, the data bus lines transfer the data itself or instructions.
Typically, the width of the data bus is commonly used in the microprocessor name: "32-bit microprocessor"
indicates that its data bus has a 32-bit width.
Signals at the CPU interface with the outside world
Address Bus
This bus is a unidirectional bus that
contains address lines transmitting output
signals of the CPU.
The lines of this bus are used to address
memory.
The CPU outputs to this external address
bus can switch to High Impedance (HiZ)
state when an external request is received
and in such a case the CPU passes the
control of the buses to another device.
Linear Addressing
This type of addressing is used only for
small systems where only part of the total
address space is used.
In such cases, lines of the address bus can
be used together with control signals to
directly select memory blocks.
For example:
Let's assume we have a
microprocessor whose address bus
width is of 16 bits;
so, the maximum addressing space is
of 2^16 memory locations (64 k
locations);
also, let's assume that the computing system uses only 12 k of memory, consisting of 3 memory
blocks of 4k. Each block can be addressed with 12 address bits (2^12 = 4096 = 4 k).
Signals at the CPU interface with the outside world
Linear Addressing
If we consider the 12 less significant bits
for addressing within blocks,
the other 4 bits in the address bus can be
used to select memory blocks.
A variant of this linear selection mode is
shown in next figure, where it was
assumed that there are:
two blocks of ROM of 4 kB and
a block of RAM 4k x 8 (formed of
two 4K x 4 bits RAM circuits).
Linear selection uses:
the bits a14, a13 and a12 of the address
bus, along with the
Read and Write control signals, and
bits a11 - a0 are used to address internal memory locations.
The read and write control signals are LOW logical (that's why they have a bar above their name).
Signals at the CPU interface with the outside world
Solution: The first thing to do is to calculate the number of required memory circuits:
256 KB : 64 KB = 4
For each IC of memory, there is a selection signal (CS) which, if activated, permits working with that
memory for reading/writing operation.
If this input is not active, the memory's input/output data buffer is inactive (HiZ).
Based on this observation, we can galvanically link the data lines with the same name (D0 to D7)
from all IC together (Di, i = 0-7, from all memory blocks give the 8 lines that bind to the 8-bit
data bus).
Signals at the CPU interface with the outside world
Control Bus
This bus comprises control signals with different functions from one microprocessor to another.
Signals at the CPU interface with the outside world
Control Bus
However, functionally, the control bus lines can be classified into the following general categories:
control and synchronization signals for data transfers with memory and I/O devices;
control and synchronization signals of the requests for the buses control;
control and synchronization signals with external events generating interrupt requests;
utility signals such as reset, clock, power supply;
CPU status signals;
various signals that are specific to both:
microprocessors types and
the purpose for which they were designed.
(different signals include, for example, inputs that can be tested through software, inputs for the CPU's
step-by-step activity command, inputs for signaling errors, inputs/outputs for working in multi-processor
system etc.)
Control Bus
Control signals for data transfer with memory and I/O devices
(ReaD) signal is indicating that a read operation is performed by the CPU. Some microprocessors
(e.g., the Motorola
Typically, the back edge of the READ signal (the rising edge) is used by the CPU
MC68000 micropro-
to actually read the data loaded on the data bus by the memory or by an I/O
cessor) have one single
device.
output signal ( ),
(WRite) signal is indicating that a write operation is performed by the CPU. which fulfills both
Typically, the back edge of the WRITE signal is used by the device addressed and functions, for level "1"
selected for the write cycle, to store the data in its own register. doing a reading opera-
tion, and for level "0"
a writing.
Control Bus
Control signals for data transfer with memory and I/O devices
Transfers between the CPU and a slow interlocutor device (memory or port) are usually asynchronous in
order that the CPU can work both:
at full speed with the fast devices and
slowly with the slow speed devices.
For this, signals are required for the implementation of the asynchronous communication protocol
(handshake). The minimum set of synchronization signals consists of the followings:
A signal generated by the CPU indicating to the interlocutor devices that the CPU has
provided (on the address bus) a valid address information (at the location with this address a
writing or a reading will be performed at the next instant).
This signal
will produce a selecting/enabling of
The address
the interlocutor device.
The sense ( ( or ) of the data bus traffic
We will note the address validation with (address Strobe).
Control Bus
Control signals for data transfer with memory and I/O devices
Remember! If READY is inactive (= 0 logic), the CPU will prolong the current machine cycle by
"freezing" all other command signals by adding waiting states (WAIT) until it receives
READY= 1; then, the write machine cycle (or reading) ends.
Control Bus
Control signals for data transfer with memory and I/O devices
Synchronization with the memory and the input/output devices are similar.
However, in many computers, by construction, the working memory's speed is known, and
working with the main memory can be regarded as synchronous, not requiring the READY signal.
In this situation, the transfer takes place strictly within a pre-specified time interval (i.e., as a
number of CPU states).
In all other cases the transfers are asynchronous, the CPU prolonging the current machine
cycle with a standby until the READY signal becomes active or until another event
(exception or reset) interrupts this machine cycle.
Generating or not a "READY" signal refers to the asynchronous or synchronous operation
mode.
In a synchronous working mode, all events take place within a specified time frame.
Control Bus
Control signals for data transfer with memory and I/O devices
Examples of transfer control signals used with different microprocessors are shown in below table.
Control Bus
Control Bus
Following the cession of the busses control, the CPU to which it was launched BR request
passes its outputs to data, addresses and control buses (only part of the control signals) in
high impedance state (HiZ).
In this way, the control of the buses lines (from the electrical point of view, of the logical
levels) is transferred to whom it was granted.
In Table below there are some examples of signals equivalent to the type of signals we have
presented as BR and BG.
Control Bus
The CPU endowed with this pair of signals typically probes the BR demand signal at the end of
each machine cycle, and gives up the bus control as soon as possible, except for special cases in
which operations cannot be interrupted (e.g., the operations provided with LOCK prefix to
I8086).
The maximum delay with which a request for access to bus control is served is, therefore, a
machine cycle.
In the case of several requests for control buses, priorities analysis is usually done with a
centralized arbitration circuit for bus requests.
Control Bus
These signals have the role of synchronizing external events with the CPU.
The control and sync signals for external interrupt requests are extremely important because:
• they allow a peripheral device to launch a service request signal to the CPU (services
that relate to data transfer, for example) which, in turn,
• determine the CPU to interrupt temporarily the running program,
• to jump to the execution of an interrupt service program, and, after that, finally
• to return to the interrupted program.
Upon receiving an interrupt request, if the CPU accepts interrupting current activity, the
interrupt device will be informed of this. As a result, the device that initiated the interrupt will
generate - for vectorized interruptions only - on the data bus an identifier (interrupt vector)
that will allow routing the execution toward the particular interrupt serving subroutine.
Control Bus
Some examples of INT and INTA signals are shown in table below.
Control Bus
These are usually signals, or combinations of output signals, indicating the state of the microprocessor.
The state of the machine is important for different additional circuits connected to the microprocessor interface
with the outside, these circuits having various control functions related to buses, external cache, and main memory.
Status signals are extremely diverse, they varying from microprocessor to microprocessor, but their functions can be
classified according to the information provided. Thus, status signals may indicate:
Utility signals
Clock signals are generated by an internal or external oscillator based on a quartz crystal, external to the
processor. On some microprocessors, the clock circuits can also "synchronize" external signals, with asynchronous
characteristics, such as: RESET and READY.
There may be crystals equivalent to parallel and serial resonant circuits (RLC) – manufacturers specify whether
the crystals are resonant in series or parallel.
The next figure shows two ways to connect quartz crystals to the microprocessor chip (the first image is the
commonly used connecting approach encountered in microprocessors with internal oscillator).