Chapter 6 - IO (Part 2)
Chapter 6 - IO (Part 2)
STRUCTURES
1
OUTLINE
▪ Computer Buses
▪ Bus Types
▪ Sample of buses (ISA, PCI, PCI Express etc)
2
PART ONE
3
We have all those individual devices
(CPU, memory and I/O), how do
these devices communicate with
one another?
4
BUSES
6
BUSES
7
▪ This so called buses is used as a mechanism to let these
devices communicate. So, what are their feature?
▪ Is there a dedicated bus/line for each device to communicate
with one another; CPU to memory, CPU to printer, memory
to scanner or CPU to speaker etc? if it not dedicated, then
how?
▪ or is it being shared by all of these devices? Wait, if it is shared,
who determine which devices will used the buses?
▪ How many type of buses? Is it one, two or three?
8
▪ It is a shared transmission medium (allows connection to multiple
devices). However, only ONE device can transmit data (or
instruction) at a time.
▪ The major parts of a computer model are the central processing unit
(CPU), memory and the Input and output circuitry (I/O).
▪ Connecting these part are 3 sets of parallel lines called buses.
▪ These buses consist of 50 to 100 separate lines and each line is
assigned particular function.
10
▪ The 3 buses are the address bus, data bus and control bus.
DATA BUS (OR DATA LINE)
▪ It provide a path for moving data between devices.
▪ Each line carry only 1 bit at a time. The number of lines (width)
determine how many bits can be transferred at a time - determine
the overall system performance.
▪ For example: if the data bus is 8-bit wide and each instruction is 16
bits long, the processor must access the memory module twice (2)
during each instruction cycle.
▪ The data bus lines are bi-directional.
▪ On these line the CPU sends out the address of the memory location
that is to be written to or read from.
13
ADDRESS BUS (CONT…)
▪ The number of memory location that the CPU can address is
determined by the number of address lines. This is calculate using 2n
for example CPU with 16 address lines can address 65536 memory
(20 address line = _______ location?)
▪ Note: When the CPU reads data from or writes data to a port, it
sends the port address out on the address bus.
14
EXAMPLE:
▪ The data bus on any processor transfers information between a particular memory
location or I/O device and the CPU. The only question is, "Which memory location or
I/O device? " The address bus answers that question.
▪ To differentiate memory locations and I/O devices, the system designer assigns a
unique memory address to each memory element and I/O device. When the software
wants to access some particular memory location or I/O device, it places the
corresponding address on the address bus. Circuitry associated with the memory or I/O
device recognizes this address and instructs the memory or I/O device to read the
data from or place data on the data bus. In either case, all other memory locations
ignore the request. Only the device whose address matches the value on the address
bus responds
▪ Think of memory as a linear array of bytes. The address of the first byte is zero and the
address of the last byte is (2𝑛 ).
15
CONTROL BUS (OR CONTROL LINES)
▪ Used to control the access to and the use of the data and address
lines.
▪ The CPU sends out signal on the control bus to enable the outputs
of addressed memory devices or port devices.
▪ Typical control bus signals are: Memory Read, Memory Write, I/O
Read, I/O Write, Bus request, Interrupt request etc.
16
EXAMPLE:
17
EXAMPLE: READ INSTRUCTION PROCESS
19
SUMMARIZE
21
WHAT DO BUSES LOOK LIKE?
PHYSICAL REALIZATION OF BUS ARCHITECTURE
▪ System bus is a number of parallel
electrical conductors.
▪ The conductors are metal lines
etched in a card or printed circuit
board (PCB).
▪ The bus extends across all of the
components that taps into the bus
lines.
▪ Analogy: highway interchange
23
SINGLE BUS PROBLEMS
24
TRADITIONAL BUS ARCHITECTURE
▪ The traditional bus connection uses three buses local bus, system bus and expansion
bus
▪ Local bus connects the processor to cache memory
▪ The cache memory controller connects the cache to local bus and to the system bus.
▪ System bus also connects main memory module
▪ Input/output transfer to and from the main memory across the system bus, and do not
interface with the processor activity because processor accesses cache memory.
▪ It is possible to connect I/O
controllers directly on to the system
bus?
▪ A more efficient solution is to make
use of one or more expansion buses
for this purpose. An expansion bus
interface buffers data transfer
between system bus and I/O
controller on the expansion bus.
26
SUMMARIZE – PART TWO
27
PART THREE
28
SAMPLES OF BUS
30
PCI (PERIPHERAL COMPONENT
INTERCONNECT)
▪ The PCI bus is an interconnection system
between a microprocessor and
attached devices in which expansion
slots (speed close to CPU speed - for
high speed operation)
▪ Frontside bus - physical connection that
connects the processor to most of the
other components in the computer (e.g.
main memory, hard drives and the PCI
slots.
▪ Backside bus - connection between the
processor and the Level 2 cache. This
bus operates at a faster speed than the
frontside bus, usually at the same speed
as the processor, so all that caching
works as efficiently as possible.
31
ACCELERATED GRAPHICS PORT
AGP is an interface specification that enables 3-D graphics to
display quickly on ordinary PC.
AGP is an interface designed to convey 3-D images (ex:-from Web
sites or CD-ROMs) much more quickly and smoothly than is possible
today on any computer other than an expensive graphics
workstation.
The interface uses your computer's main storage (RAM) for
refreshing the monitor image and to support the texture mapping,
z-buffering, and alpha blending required for 3-D image display.
ACCELERATED GRAPHICS PORT (CONT.)
▪ The AGP main memory use is dynamic, meaning that when not
being used for accelerated graphics, main memory is restored for
use by the operating system or other applications.
▪ Intel, which has taken the lead in developing its specifications,
introduced AGP into a chipset for its Pentium microprocessor.
▪ The newer, faster microchips in Pentium line are designed to work
with the AGP chipset. Intel says the advanced floating point unit
and faster cache algorithm of the more advanced Pentiums are
better adapted for 3-dimensional applications.
INTERFACE
Port
▪ Serial
▪ Parallel
▪ PS/2
▪ PCMCIA
▪ USB (Universal Serial Bus)
No port
▪ Infrared
▪ Bluetooth
UNIVERSAL SERIAL BUS
36
BUS DESIGN
1. Type - Dedicated or Multiplexed
2. Bus Width - Address or Data
▪ Multiplexed bus - When the bus is used for more than 1 function.
e.g. 8085 microprocessor outputs A7- A0 in first clock cycles on pins. AD7 –
AD0.
Advantages: few pins lines are required. less cost and save space
Disadvantages: slow in speed
BUS WIDTH
▪ Centralized hardware device called bus controller (Arbiter), is responsible for allocating
time on the bus (e.g. daisy chain)
▪ Distributed access control logic in each module act together to share bus. each master
has arbiter compared to only single in centralized approach. Equal responsibility is given
to all devices to carry out arbitration process, without using a central arbiter
DATA TRANSFER TYPE
▪ Read Dedicated address is put on bus and remain there while data are put on
the data bus
▪ Write Dedicated data put on data bus as soon as the address has stabilized
▪ Read Multiplexed bus is used to specifying address and then for transferring data
after a wait while data is being fetched
▪ Write Multiplexed bus is used to specifying address and then transferring data
(same as read operation)
▪ Read-modify-write address is broadcast once at beginning a simply read is
followed immediately by a write to the same address
▪ Read-after-write a write followed immediately by a read from the same
address,performed for checking purposes
▪ Block one address cycle is followed by n data cycles.
▪ The first data item is transferred to or from the specified address; remainder data
items are transferred to or from subsequent addresses