Professional Documents
Culture Documents
Lecture 14 – Buses
Ref: The x86 PC, 5th Edition, M. Ali Mazidi, J. G. Mazidi and D. Causey, Ed.
Pearson – Chapter 26 and 27
Ref: Miscellaneous sources 3
Buses
• Bus is a communication system that transfers
data between components (from Latin
"omnibus", meaning "for all")
4
Simplified Illustration of a Bus
Buses
• Set of lines to which several devices may be connected
• Enables data to be transferred from one device to any other
• Logic gate that sends data over a bus line is called the bus driver
• All devices connected to the bus can send data, but only 1 can drive the
data at a time → tri-state gates (if control signal is high output is Z)
• E.g., of how to connected a 1-bit device to a bus:
0 X 0 0 0 Feed Q back
0 X 1 1 1 Feed Q back
9
Motherboard Overview
• PCB that interconnects all PC components
Memory
slots Chipset
ISA bus
slots
10
AGP: Advanced
Graphics Port
IDE: Integrated
Drive Electronics
12
Buses Overview – EISA - PCI
• EISA (Extended Industry Standard Architecture) bus
supports 32 data bits and provides 157 bus lines
and 186-pin slots
Downward compatibility: functionality and plug
compatibility (EISA → ISA → PC Bus)
• PCI (Peripheral Component Interconnect) local bus:
an advanced high-performance local bus that
supports multiple peripheral devices.
EISA Slots
PCI bus
13
Computer Architecture and Bus Evolution
ISA bus
Wikipedia
Bandwidth of Different Buses
M = 106
16
ISA BUS
17
ISA BUS –Bus Slot Signals
Address and Data Lines:
SA0–SA19 (system address)
Provides address signals
for the desired memory
or I/O location.
The chipset latches these signals &
holds them valid throughout the
bus cycle.
SD0–SD15 (system data bus)
Transfers data between
CPU, memory & I/O devices.
62 pins
18
ISA BUS – Component Side
LA17–LA23 (latchable address)
With SA0–SA19, gives access to
16M of memory space from the
ISA slot.
These signals are latched
by the board designed for
the expansion slot.
SD0–SD15 (system data bus)
Transfers data between
CPU, memory & I/O devices.
36 pins
19
PCI BUS
• PCI was conceived as a specification standard for peripheral
connections for Intel's high-performance microprocessors such
as the 80486 and Pentium.
– Intel developed PCI local bus specifications, available free of
charge to all PC & add-in board manufacturers
• A local bus standard with the pin-out for expansion slot
connections, PCI incorporates these features:
– Burst mode data transfer; Level-triggered interrupts.
– Bus mastering; Automatic configuration; High bandwidth.
– A bridge which allows any kind of add-in card based
on ISA to be plugged into the PCI local bus.
20
Peripheral Component Interconnect (PCI) Bus
Characteristics
• More important PCI characteristics:
– PCI supports both 5- and 3.3-V expansion cards.
• Cutouts (keys) prevents users from plugging a card with
one voltage into a motherboard with a different voltage
– It provides auto-configuration capability
• A user can install a new add-in card without setting
DIP switches, jumpers, and selecting the interrupt.
• Level-triggered interrupts support interrupt sharing.
– It supports up to 10 peripherals
– Use of a highly refined connector with a small area of
contact makes the PCI bus a high-frequency bus.
21
PCI Bus
• PCI (Peripheral Component Interconnect) Local high-
performance bus:
– 32-bit or 64-bit bus with multiplexed address and data lines @ 33 or 66
MHZ
• Interconnect mechanism between:
– peripheral controller components
– add-in boards
– processor
PCI BUS – Master-Slave
• Many devices connected together communicate with each
other via address, data & control buses.
– When one device wishes to communicate with another,
it sends an address to distinguish it from others
– It also sends a read or write signal to indicate its intention
• A master device initiates & controls communication.
– The responding device is called the slave.
• In x86-based PCs, the CPU is an example of a master and
memory is an example of a slave.
23
PCI – Bus Arbitration
24
Fixed Arbitration – Daisy Chain
• Chain of serially connected components
• Priority of an interface is determined by its
position in the chain.
25
Fixed Arbitration – Daisy Chain
Device 1 Device 2 Device N
Highest Lowest
Priority Priority
wired-OR
Data/Addr
• Advantage: simple
• Disadvantages:
– Cannot assure fairness – a low-priority device may be
locked out indefinitely
– Slower – the daisy chain grant signal limits the bus speed
26
Daisy-chained Interrupt Example
27
Example of Fixed Arbitration
• SCSI Protocol
– Each device has a SCSI ID used to identify it on the bus
– When multiple devices request the bus → the one
with highest ID wins and is allowed to access the bus
• Advantage:
– Easy to decided which devices gets access to the bus
• Disadvantage:
– Can prevent a device with a lower ID from ever getting
a chance to access the bus → starvation
Example: SCSI
• A SCSI bus has four devices attached to it. With IDs 1,
2, 3, and 4. If each device wants to use 30 MB/s of bus
bandwidth, and the total bandwidth of the SCSI bus is
80 MB/s, how much bandwidth will each device be
able to use?
Example: SCSI Solution
• A SCSI bus has four devices attached to it. With IDs 1,
2, 3, and 4. If each device wants to use 30 MB/s of bus
bandwidth, and the total bandwidth of the SCSI bus is
80 MB/s, how much bandwidth will each device be
able to use?
Solution:
• Device 4 has the highest priority, so it gets access to the bus whenever it tries
and is able to use its full 30 MB/s.
• Of the 50 MB/s remaining, device 3 is able to use 30 MB/s, because it only
loses arbitration when device 4 wants to use the bus.
• Device 2 uses all of the remaining 20 MB/s, because it always beats device 1,
which gets no bandwidth (here we are ignoring start up issues –device 1 might
get one chance to access the bus if its first request was made before any of the
other devices wanted to use the bus.
Centralized Parallel Arbitration
Device 1 Device 2 Device N
Data/Addr
31
Bus Protocol
• To coordinate activity, buses follow a strict set of timing and signal
specifications, called bus protocol.
– Synchronous protocol - bus activity is synchronized according to a
central frequency—the timing of the central clock oscillator (e.g.,
interface with memory which has strict timing constraints)
– Asynchronous protocol - decides when it is ready and does not
operate according to the central clock frequency (e.g., x86 printer
interfacing)
• Asynchronous is used when there is a mismatch between the bus timing
of the master and slave.
• Synchronous protocol generally has a higher rate of data transfer than
asynchronous protocol.
32
PCI BUS Video Requirements
where 1 M = 220
35
PCI BUS Video Requirements con’t
36
PCI BUS Video Requirements con’t - Solution
37
PCI Local Bus Characteristics
• Important characteristics of the PCI local bus:
– Maximum speed of 33 MHz (extended to 66 MHz)
– 32- & 64-bit data paths.
– Burst mode data transfer of 2-1-1-1 used by microprocessors such as
the Pentium.
– Bus mastering, for multiprocessor implementation, where any number
of microprocessors can become master and take control of the buses.
– With implementation of a bus bridge, it supports the slow ISA bus.
• Buffers in the bridge allow the processor to write into the buffer,
leaving the task of handling ISA to the bridge.
38
PCI Performance
• The PCI local bus supports both single memory cycle and burst mode.
– Single cycle takes 2 clocks to read or write a word of data.
– In the first clock, the address is provided and in each subsequent clock, the
data is accessed.
• This makes it 2-1-1-1-1-1....
39
PCI Performance - Solution
• The PCI local bus supports both single memory cycle and burst mode.
– Single cycle takes 2 clocks to read or write a word of data.
– In the first clock, the address is provided and in each subsequent clock, the
data is accessed.
• This makes it 2-1-1-1-1-1....
40
PCI Performance
where
1 M = 106
1 K = 103
41
PCI Express (PCIe)
• Supersedes PCI and AGP
• High-speed serial computer expansion bus standard
• PCIe has numerous improvements over the
aforementioned bus standards, including:
– higher maximum system bus throughput
– lower I/O pin count
– smaller physical footprint
– better performance-scaling for bus devices
– a more detailed error detection and reporting mechanism
(Advanced Error Reporting (AER))
– native hot-plug functionality.
42
PCIe Types
43
PCIe Topology
44
PCIe Topology con’t
• Single Hub as Chipset (ICH-Intel Communications
Chipset/Hub)
45
PCI vs. PCIe
PCI PCIe
Parallel Bus architecture Serial bus
All devices share a common set of Based on point-to-point topology
address/data/control lines with separate serial links
Arbiter needed and only one No arbiter needed. Multiple
master at a time has control connections at a time
Bus clock speed limited to slowest Point-to point full-duplex with no
peripheral on the bus inherent limitation
46
Universal Serial Bus (USB)
The Easy Way to Plug & Play. Anything. Anytime. Anyone.
47
USB
• Originally developed in 1995 by a consortium including
– Compaq, HP, Intel, Lucent, Microsoft, and Philips
• USB 1.1 supports (1996)
– Low-speed devices (1.5 Mbps)
– Full-speed devices (12 Mbps)
• USB 2.0 supports (2000)
– High-speed devices
• Up to 480 Mbps (a factor of 40 over USB 1.1)
– Uses the same connectors
• Transmission speed is negotiated on device-by-device basis
– USB 3.0 (2008)
• Superspeed = 6 Gbit/s
• USB 3.2 up to 20 Gbit/s
USB (cont’d)
• Motivation for USB
– Avoid device-specific interfaces
• Eliminates multitude of interfaces
– PS/2, serial, parallel, monitor, microphone, keyboard,…
– Avoid non-shareable interfaces
• Standard interfaces support only one device
– Avoid I/O address space and IRQ problems
• USB does not require memory or address space
– Avoid installation and configuration problems
• Don’t have to open the box to install and configure jumpers
– Allow hot attachment of devices
USB (cont’d)
• Additional advantages of USB
– Power distribution
• Simple devices can be bus-powered
– Examples: mouse, keyboards, floppy disk drives, wireless LANs,
coffee warmers, reading lights, MP3 players, …
– Control peripherals
• Possible because USB allows data to flow in both
directions
– Expandable through hubs
– Power conservation
• Enters suspend state if there is no activity for 3 ms
– Error detection and recovery
• Uses CRC
USB Ports - Bus Comparison
• A comparison of ISA, PCI, COM, LPT, and USB.
– In the calculation of data transfer rate (bus bandwidth) for ISA & PCI
buses, a 2-clock read/write cycle is assumed.
– 2-microsecond timing for the parallel port is assumed.
51
Standard socket, but different Hub
53
USB Host Peripheral Controller
• Cypress IC
– Single chip programmable USB dual-role (Host/Peripheral)controller
with two configurable Serial Interface Engines (SIEs)and four USB
ports
– 8K x 16 internal RAM for code and data buffering
54
Host, Peripherals and Hubs
• There are two types of external hubs:
– Bus-powered - power source comes from the root hub
of the host PC via a USB cable.
– Self-powered - the hub has its own power source.
• It is also referred to as an externally powered hub.
55
Host, Peripherals and Hubs (cont.)
• A majority of peripheral devices in everyday use,
are bus-powered, such as Flash memory sticks.
– USB provides power.
• USB electrical current allocated in units of 100mA
up to a maximum of 500mA per port
– The host can provide a maximum of 500 mA of
current (5V power source) per A-connector
– The hub uses 100 mA
– As each downstream peripheral port must
be given up to 500 mA, the number of downstream
peripheral ports in the bus-powered hub is
limited to 4.
• 4 x 100 mA + 100 mA = 500mA
56
Host, Peripherals and Hubs (cont.)
• The self-powered external hub takes power from a source other than the
motherboard.
– Generally from the wall outlet.
57
Daisy chaining the Hubs
58
USB Cable Signals
• The USB cable has four wires inside it:
– Vcc, Gnd for the power source
– D+, and D– for the data path
59
USB cable signals (cont.)
61
USB Lines/Pins
USB Electrical Specifications
Data bit D+ D-
1 high low
0 low high
• Plethora of connectors
63
USB C (2016)
• Defines a new reversible
plug connector
• 24-pin double-sided
connector
– Four PWR/GND
– Two differential pairs
for USB 2.0
– Four pairs for USB 3.0
– Config pin to detect
orientation
– Misc pins
• Support power current
up to 1.5A and 3.0A
• Used as only connector
to transfer data and
power the MacBook
64
USB Video
Summary
• PC bus architectures
• PC motherboard
• Bandwidth calculations
• PC buses
– ISA, EISA, PCI, PCIe
– USB
66