31
Computer Buses SJSU - Fall 2008 CS 147 Vu Luu

Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Embed Size (px)

Citation preview

Page 1: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Computer Buses

SJSU - Fall 2008

CS 147

Vu Luu

Page 2: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Contents

1. Concepts

2. Measurement

3. Operation

Page 3: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Concepts

• A bus is a collection of wires and connectors through which the data is transmitted.

• Bus = address bus + data bus

– Data bus: transfers actual data.

– Address bus: transfers information about data and where it should go.

Page 4: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Concepts (cont.)

• Bus protocol: rules determining the format and transmission of data through bus.

• Parallel bus: data is transmitted in parallel.– Advantage: fast– Disadvantage: high cost for long distance transmission,

interference between lines at high frequency.

• Serial bus: data is transmitted in serial.– Advantage: low cost for long distance transmission, no

interference.– Disadvantage: slow

• Bus master: The device controls bus. Other devices are slaves.

Page 5: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Concepts (cont.)

• Local (system) bus: CPU main memory.

• Front side bus:

– Original concept: CPU components

– Modern Intel architecture: CPU NorthBridge chipset

• Back side bus: CPU L2 cache

• Memory bus: Northbridge chipset main memory

• AGP bus: Northbridge chipset GPU

• ISA, EISA, VLB, PCI, Firewire, USB, PCI-Express bus: motherboard peripheral devices.

Page 6: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation
Page 7: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Measurement

• Bus width: indicates the number of wires in the bus for transferring data.

• Bus bandwidth: refers to the total amount of data that can theoretically be transferred on the bus in a given unit of time.

Page 8: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Bus Width (bit) Bandwidth (MB/s)

16-bit ISA 16 15.9

EISA 32 31.8

VLB 32 127.2

PCI 32 127.2

64-bit PCI 2.1 (66 MHz) 64 508.6

AGP 8x 32 2,133

USB 2 1 Slow-Speed: 1.5 Mbit/sFull-Speed: 12 Mbit/sHi-Speed: 480 Mbit/s

Firewire 400 1 400 Mbit/s

PCI-Express 16x version 2 16 8,000

Width and Bandwidth of Some Typical Buses

Page 9: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Synchronous Bus vs. Asynchronouse Bus

• A bus can be classified as one of two type: synchronous and asynchronous.

• Synchronous bus: there is a common clock that synchronizes bus operations.

• Asynchronous bus: there is no common clock. Bus master and slaves have to “handshake” during transmission process.

Page 10: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

1. CPU places address of the location it wants to read on the address lines.

1

Page 11: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

2. After the voltages on the address lines have become stable, CPU asserts MREQ and RD lines.

1

2

Page 12: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

3. Memory controller locates memory location and loads it into data lines.

1

2

3

Page 13: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

4. CPU takes data from data lines and then de-asserts MREQ and RD to release the bus.

1

2

3

4

Page 14: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

1. CPU puts address on the bus.

1

Page 15: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

2. CPU asserts MREQ and RD lines.

1

2

Page 16: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

3. CPU asserts MSYN line. Memory controller locates and loads data from memory to data lines.

1

2

3

Page 17: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

4. Memory controller locates, loads data from memory to data lines, and asserts SSYN line.

1

2

3

4

4

Page 18: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

5. CPU takes data from data lines and then de-asserts MREQ, RD, and MSYN.

1

2

3

4

4

5

5

5

Page 19: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

6. Finally, memory controller de-assert SSYN.

1

2

3

4

4

5

5

5

6

Page 20: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Bridge-based bus architectures

• System includes a lot of buses which are segregated by bridges.

• Advantage: buses can simultaneously operate.

• Intel architecture:

Page 21: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation
Page 22: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Bridging with AMD processors

Page 23: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Bridging with VIA C7 processors

Page 24: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Internal Communication Methodologies

• Programmed I/O (polling)

• Interrupt-drive I/O

• Direct Memory Access (DMA)

Page 25: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Programmed I/O (polling)

• CPU polls each device to see if it needs servicing.

• Drawback: The CPU wastes time for polling devices (busy-wait.)

Page 26: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Mode Maximum transfer rate (MB/s)

mode 0 3.3

mode 1 5.2

mode 2 8.3

mode 3 11.1

mode 4 16.7

mode 5 20

mode 6 25

Programmed I/O modes in the ATA interface

Page 27: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Interrupt-Drive I/O (PIO)

• Device requests service through a special interrupt request line that goes directly to the CPU.

• No busy-wait. More efficient than PIO.

Page 28: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Direct Memory Access (DMA)

• Devices transfer data directly to and from memory bypasses the CPU.

• Very efficient mode. CPU is free to do other operations.

Page 29: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation
Page 30: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

Modes Maximum transfer rate (MB/s)

Multi-word DMA 1 13.3

Multi-word DMA 2 16.6

Ultra DMA 0 16.7

Ultra DMA 1 25.0

Ultra DMA 2 33.3

Ultra DMA 3 44.4

Ultra DMA 4 66.7

Ultra DMA 5 100

Ultra DMA 6 133

DMA modes in the ATA interface

Page 31: Computer Buses SJSU - Fall 2008 CS 147 Vu Luu. Contents 1. Concepts 2. Measurement 3. Operation

References

• Murdocca, Miles and Heuring, Vincent. Computer Architecture and Organization: An Integrated Approach. John Wiley & Sons, Inc., 2007. p.303 – p.316.

• Kozierok, Charles. The PC Guide. http://www.pcguide.com/.