Beruflich Dokumente
Kultur Dokumente
Input/Output
Network
Processor
Processor
Input
Input
Control
Memory
Memory
Datapath
Output
Output
Control
Datapath
Bus
A shared communication link
A single set of wires used to connect two or more
components
Unlike a typical wire in a processor, a bus can communicate in
different directions at different times.
Processor
Input
Control
Datapath
Memory
Output
Advantages of Buses
Versatility:
New devices can be added easily
Peripheral devices can be moved between computer
systems that use the same bus standard
Low Cost:
A single set of wires is shared in multiple ways
Processor
I/O
Device
I/O
Device
I/O
Device
Memory
4
Disadvantage of Buses
It creates a communication bottleneck
Bus bandwidth can limit the maximum I/O throughput
Processor
I/O
Device
I/O
Device
I/O
Device
Memory
5
Bus
Slave
Types of buses
Processor memory bus
very short (a few inches)
usually designed for specific processor.
highest bandwidth, lowest latency
optimized for cache block transfers
Backplane bus
up to about 20 inches long
backplane = an interconnection structure within the chassis
connects proc&memory to nearby components (multimedia accelerators,
network cards, I/O adaptors, ...)
standardized, allowing multiple vendors of devices
I/O buses
longer, lower bandwidth, higher latency
connect to other devices (disk, printer, other computers ...)
need to match a wide range of I/O devices
connects to the processor-memory bus or backplane bus
8
Memory
I/O Devices
A Two-Bus System
Processor Memory Bus
Processor
Memory
Bus
Adaptor
I/O
Bus
Bus
Adaptor
Bus
Adaptor
I/O
Bus
I/O
Bus
10
A Three-Bus System
Processor Memory Bus
Processor
Memory
Bus
Adaptor
Backplane Bus
Bus
Adaptor
Bus
Adaptor
I/O Bus
I/O Bus
11
12
Example: Pentium 4
13
Asynchronous Bus:
It is not clocked
It can accommodate a wide range of devices
It can be lengthened without worrying about clock skew
Communication protocol is more complicated
14
2.
3.
4.
5.
15
Asynchronous Handshaking
Consider an I/O device asking for a word of data from
the memory system
ReadReq
1
3
Data
2
4
Ack
DataRdy
5
7
16
17
18
Choosing a master
How do you decide which component will be the bus
master
the one that initiates a bus transaction?
Multiple masters:
19
20
Device 1
Highest
Priority
Grant
Device N
Lowest
Priority
Device 2
Grant
Bus
Arbiter
Grant
Release
Request
wired-OR
Advantage: simple
Disadvantages:
Doesnt assure fairness:
A low-priority device may be locked out indefinitely
The daisy chain grant signal also limits the bus speed
21
Centralized Arbitration
Device 1
Grant
Device 2
Device N
Req
Bus
Arbiter
Block transfers:
23
High performance
Low cost
Bus width
Separate address
& data lines
Multiplex address
& data lines
Data width
Wider is faster
(e.g., 32 bits)
Narrower is cheaper
(e.g., 8 bits)
Transfer size
Single-word transfer
is simpler
Bus masters
Multiple
Single master
(needs arbitration) (no arbitration)
Clocking
Synchronous
Asynchronous
24
25
26
27
Polling
CPU
Memory
IOC
Is the
data
ready?
yes
no
read
data
device
store
data
done?
Advantage:
no
yes
Disadvantage:
Polling overhead can consume a lot of CPU time
28
add
sub
and
or
nop
(1) I/O
interrupt
user
program
(2) save PC
Memory
IOC
(3) interrupt
service addr
device
Advantage:
(4)
read
store
... :
rti
interrupt
service
routine
memory
Disadvantage:
Special hardware is needed to
- Cause an interrupt (I/O device)
- Detect an interrupt (processor)
29
CPU
Memory
DMAC
IOC
device
DMA Controller does whatever
is needed to get IO Controller
and Memory to transfer data
on the bus.
30
Key Terms
Bus, processor-memory bus, backplane bus
Synchronous bus, asynchronous bus, handshaking
Bus master/slave, bus arbitration
Daisy chain arbitration
Centralized arbitration, e.g.PCI
Distributed arbitration by self-selection, e.g., SCSI
Distributed arbitration by collision detection, e.g., EtherNet
31