50
CSC 370 (Blum) 1 Communicating with Devices: Buses, Bridges, etc.

CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

Embed Size (px)

Citation preview

Page 1: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 1

Communicating with Devices: Buses, Bridges, etc.

Page 2: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 2

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.

Page 3: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 3

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.

Page 4: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 4

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.

Page 5: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 5

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.

Page 6: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 6

Northbridge• The Northbridge handles the high-speed, high-

volume data communication between the CPU, cache, memory and AGP (accelerated graphics port).

• Since the Northbridge manages the processor-memory 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.

Page 7: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 7

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.

Page 8: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 8

Page 9: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 9

North

South

Page 10: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 10

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.

Page 11: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 11

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).

Page 12: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 12

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.

Page 13: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 13

Link to PC 2001 System Design Guide

Page 14: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 14

PC 2001 System Design Guide

Page 15: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 15

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.

Page 16: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 16

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.

Page 17: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 17

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.

Page 18: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 18

Start/Settings/Control Panel/System/ Hardware/Device Manager

Page 19: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 19

Click + to expand items under a particular device then double click on the item

Page 20: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 20

Resources

Page 21: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 21

Page 22: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 22

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.

Page 23: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 23

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.

Page 24: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 24

Table of IRQs

Page 25: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 25

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.

Page 26: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 26

Table of IRQs (Cont.)

Page 27: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 27

NIC using IRQ 9

Page 28: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 28

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).

Page 29: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 29

COM and LPT Assignments

Port I/O Base Address

IRQ

COM1 03F8 4

COM2 02F8 3

COM3 03E8 4

COM4 02E8 3

LPT1 0378 7

LPT2 0278 5

Page 30: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 30

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).

Page 31: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 31

DMA Channel for Floppy

Page 32: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 32

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.

Page 33: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 33

Changing View of the Device Manager

Page 34: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 34

DMA

Page 35: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 35

I/O Addresses

Page 36: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 36

IRQs

Page 37: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 37

Memory-Mapped I/O

Page 38: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 38

Buses that have come and gone• Micro-Channel Architecture (MCA) extends to

32-bit width, increased speed, was self-configuring 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.

Page 39: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 39

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.

Page 40: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 40

Bus Comparison Table

Page 41: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 41

PCI Card Connectors

A PCI card has 47 pins with no bus mastering and has 49 pins with bus mastering.

Page 42: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 42

PCI Slots

Page 43: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 43

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.

Page 44: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 44

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.

Page 45: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 45

Hardware Compatibility List

Page 46: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 46

Look for Compatibility between device and operating system

Page 47: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 47

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.

Page 48: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 48

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.

Page 49: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 49

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.

Page 50: CSC 370 (Blum)1 Communicating with Devices: Buses, Bridges, etc

CSC 370 (Blum) 50

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