Buses and Bridges - La Salle University

advertisement
Communicating with Devices:
Buses, Bridges, etc.
CSC 370 (Blum)
1
Look to the Future
• From the beginning PCs have been made with
expandability and adaptability in mind.
• While certain I/O devices came standard, there
was room to add others – to expand the
computer’s capabilities and to adapt the PC to the
particular needs.
– The circuitry required by the new device is placed on
the expansion card or adapter card.
– We also need to connect to and communicate with the
rest of the PC, this is the job of the expansion bus.
CSC 370 (Blum)
2
Standards
• IBM developed the first PCs, the first PC bus and
the first PC expansion slots. It was an 8-bit bus.
They allowed others to use that technology
without having to pay royalties. (However, they
never released the full specifications.)
– This step allowed competitors to make IBM “clones”
which brought the price of PCs down. But the low price
helped to establish a standard.
– The standard made peripheral makers’ jobs easier.
They only had to design for one interface.
CSC 370 (Blum)
3
Bottlenecks
• The standard devices and expansion devices
operate at a wide variety of speeds. We need a
design that allows to whatever extent possible
each device to operate at its own speed.
– Actually we will have a hierarchy of standard speeds –
different buses carrying data at different speeds.
• The interface between devices of different speeds
can be a source of slow downs (bottlenecks).
– The chipset handles much of this interfacing.
CSC 370 (Blum)
4
Chipset
• The main components of the computer (processor,
memory, cache, etc.) plug into the motherboard
and communicate via the chipset.
• The chipset determines which type of processor
can be used, how fast a processor, how much
memory, what type of memory, and so on.
• The chipset’s function are typically broken into
two sets, one handled by the Northbridge and the
other handled by the Southbridge.
CSC 370 (Blum)
5
Northbridge
• The Northbridge handles the high-speed, highvolume data communication between the CPU,
cache, memory and AGP (accelerated graphics port).
• Since the Northbridge manages the processormemory interaction (the front-side bus bottleneck),
its performance is critical.
• The Northbridge determines the FSB speed.
Typically the processor operates at a multiplicative
factor (the CPU multiplier) of the FSB speed.
– It uses synchronous memory, recall SDRAM.
CSC 370 (Blum)
6
Southbridge
• The Southbridge allows communication
with a greater variety of slower devices. It
connects to the secondary buses – USB,
IDE, PS/2, Ethernet.
• Since it handles accessing the hard disk, the
Southbridge manages a bottleneck of its
own, especially for memory-intensive
applications.
CSC 370 (Blum)
7
CSC 370 (Blum)
8
North
South
CSC 370 (Blum)
9
Bridge Interface
• Older chipsets used the PCI (Peripheral Component
Interconnect) Bus to connect the Northbridge and
Southbridge. But with more devices using the PCI
bus, modern chipsets have introduced a dedicated
interface between the chips.
• Another multiplicative speed factor is between the
FSB speed and the PCI speed.
– The standard PCI bus speed is 33.3 MHz, while standard
FSB speeds are 100 MHz (3X) and 133 MHz (4X).
– Motherboards that use this multiplicative factor are said
to be synchronous.
CSC 370 (Blum)
10
Bus History
• When Intel moved to a 16-bit data bus (with the
256), the expansion buses needed to be changed as
well.
• IBM developed a 16-bit bus that was backward
compatible with the PC 8-bit bus. They debuted it
in their Advanced Technology (AT) computer
and it became known as the AT bus.
• Based on the AT bus, some IBM competitors got
together to lay out some specifications known as
Industry Standard Architecture (ISA).
CSC 370 (Blum)
11
No more ISA
• ISA slots were kept in PCs for reasons of
backward compatibility for many years.
• They have been officially dropped from
what Microsoft and Intel see as a PC in their
PC 2001 System Design Guide.
– This move is to reduce legacy dependence.
– If needed one can get PCI cards that can
simulate an ISA card to interface with legacy
devices.
CSC 370 (Blum)
12
Link to PC 2001 System Design Guide
CSC 370 (Blum)
13
PC 2001 System Design Guide
CSC 370 (Blum)
14
Communication
• Expansion cards, as well as other peripheral
devices, can communicate with the processor and
memory through one or more of the following:
–
–
–
–
I/O Addresses
Interrupt Requests Lines (IRQs)
Direct Memory Access (DMA) channels
Memory Addresses
• Known as system resources.
CSC 370 (Blum)
15
I/O Address
• The processor has an external data bus and an
address bus.
– One use of the address bus is to indicate the word in
memory that the processor wishes to access.
– A set of address bus combinations are reserved to
communicate with peripherals. A given peripheral may
have several addresses assigned to it, each
corresponding to a different action that the processor is
requesting.
CSC 370 (Blum)
16
Uniqueness
• As is normal with addresses, each I/O
address should be unique. If two devices
shared an I/O address, then it would be
unclear which device the processor intended
to communicate with.
• IBM set the early standards assigning
certain standard devices set I/O addresses.
CSC 370 (Blum)
17
Start/Settings/Control Panel/System/
Hardware/Device Manager
CSC 370 (Blum)
18
Click + to expand items under a particular
device then double click on the item
CSC 370 (Blum)
19
Resources
CSC 370 (Blum)
20
CSC 370 (Blum)
21
IRQs
• While I/O addressing allows the processor to
initiate communication with a peripheral, the IRQ
allows the peripheral to initiate communication
with the processor. The processor must be
“interrupted.”
• The processor has one pin to indicate that it has
been interrupted. When it reaches a point at which
it can process the interruption, it needs to trace
back and determine which device interrupted it.
This is the purpose of the IRQs.
CSC 370 (Blum)
22
Interrupt Controller
• After the processor
has been interrupted, it
uses the I/O Address
approach to initiate
communication with
the interrupt controller
which will help the
processor determine
which device made the
request.
CSC 370 (Blum)
23
Table of IRQs
CSC 370 (Blum)
24
Another type of addressing
• IRQs are another form of addressing.
• There are far fewer of IRQs than there are I/O
addresses and so it is more likely that IRQ
conflicts will occur.
– Under certain circumstances it is possible for two
devices to share an IRQ line provided the two devices
are never active simultaneously (e.g. a fax and a
modem that use the same phone line).
• Early on IBM assigned to IRQs to some standard
devices.
CSC 370 (Blum)
25
Table of IRQs (Cont.)
CSC 370 (Blum)
26
NIC using IRQ 9
CSC 370 (Blum)
27
Ports
• To accommodate that many devices would
need I/O addresses, an IRQ and a set of
rules for communicating, two standards
were established – one for serial
communication (the COM ports) and
another for parallel communication (the
LPT ports).
CSC 370 (Blum)
28
COM and LPT Assignments
Port
IRQ
COM1
I/O Base
Address
03F8
COM2
02F8
3
COM3
03E8
4
COM4
02E8
3
LPT1
0378
7
LPT2
0278
5
CSC 370 (Blum)
4
29
DMA
• Direct Memory Access (DMA) allows devices to
interact with the memory without the processor
having to get involved.
• The processor delegates some of its traffic control
duties.
• Now we have a situation in which a number of
devices may want to use the buses to access
memory, so we need another addressing/
requesting system.
– Note with our cache hierarchy, we hope that the
processor accesses the memory infrequently (less than
5% of the time).
CSC 370 (Blum)
30
DMA Channel for Floppy
CSC 370 (Blum)
31
Bus Mastering
• Choosing to show the floppy’s DMA channel was
not just a random example. The floppy uses classic
(third-party) DMA.
• Third-party DMA was slow.
• In first-party DMA, a.k.a. bus mastering, the
device (e.g. hard disk drive) controls the
interaction with memory.
– The devices “sense” if some other device is accesses
memory.
CSC 370 (Blum)
32
Changing View of the Device Manager
CSC 370 (Blum)
33
DMA
CSC 370 (Blum)
34
I/O Addresses
CSC 370 (Blum)
35
IRQs
CSC 370 (Blum)
36
Memory-Mapped I/O
CSC 370 (Blum)
37
Buses that have come and gone
• Micro-Channel Architecture (MCA) extends to
32-bit width, increased speed, was selfconfiguring BUT was not backward compatible
and was proprietary
• Extended ISA (EISA) was 32-bit, self-configuring,
backward compatible, open standard BUT slow
• Video Electronics Standards Association Local
Bus (VL-Bus or VESA Bus) was fast because it
worked with the North bridge instead of the South
Bridge BUT was NOT self-configuring.
CSC 370 (Blum)
38
And the Winner is PCI
• Peripheral Component Interconnect (PCI)
• Intel introduced the PCI bus structure pretty much
at the same time it introduced the Pentium.
– Like the VESA bus, it interfaces with the Northbridge
so it is fast.
– It is also self-configuring.
– It allows for bus mastering.
– It was effectively free (provided automatically by Intel).
– It allowed data bursting.
– It was scalable.
– While introduced by Intel, it works with other
processors including Machintosh.
CSC 370 (Blum)
39
Bus Comparison Table
CSC 370 (Blum)
40
PCI Card Connectors
A PCI card has 47 pins with no bus mastering and has 49 pins
with bus mastering.
CSC 370 (Blum)
41
PCI Slots
CSC 370 (Blum)
42
Putting a card in
• Keep the card in its anti-static bag until you are
ready to insert it.
• Turn off and unplug the PC.
• If you don’t have a wrist strap to protect against
electrostatic discharge (ESD) then after removing
the card from the bag touch the PC’s power supply.
The smallest shock could ruin the card or the
motherboard.
• Insert the card straight in or at most a slight angle.
• Screw the card to the box with a connection screw –
it keeps the card in place and can help ground it.
CSC 370 (Blum)
43
Putting a card in (Cont.)
• Close the computer, plug it in and start.
• You should get a message from the operating
system that it has detected new hardware.
• It will search for a driver and/or request that you
insert a CD with the driver.
• You may need to reboot depending on the device.
• You should look for the new device in the device
manager to make sure there are no conflicts.
CSC 370 (Blum)
44
Hardware Compatibility List
CSC 370 (Blum)
45
Look for Compatibility between
device and operating system
CSC 370 (Blum)
46
Plug and Play
• Plug and Play (PnP) is a feature in which the
system configures a device automatically rather
than the user having to set jumpers and choose
resources, etc.
• For PnP one needs:
– A PnP BIOS
– A PnP operating system
– A PnP device
• All PCI devices are PnP
• A device which is not PnP is called a “legacy” device.
CSC 370 (Blum)
47
How Plug and Play Works
• Initially the PnP devices are put on hold and
resources are assigned to legacy devices.
• Then the system starts querying the PnP devices
about the resources each wants.
• A PnP device will provide a list of resources it
could use.
– For example, it would not specify IRQ 3 but rather
specify that it could use IRQ 3 or IRQ 5 or IRQ 7.
• A file with PnP information, called the Extended
System Configuration Data (ESCD), is kept.
CSC 370 (Blum)
48
AGP
• Specification developed by Intel, even
faster than PCI and more directly connected
to the Northbridge is the AGP (Accelerated
Graphics Port).
• It is dedicated to graphics. It will have its
own slot to be used only for this purpose.
CSC 370 (Blum)
49
References
• All-in-One A+ Certification, M. Meyers and
S. Jernigan
• http://www.pcguide.com
• PC Hardware in a Nutshell, R. Thompson
and B. Thompson
CSC 370 (Blum)
50
Download