Professional Documents
Culture Documents
Bus PDF
Bus PDF
A Bus is:
a shared communication link
Slow vehicle that many people ride together a single set of wires used to connect multiple subsystems
well, true...
A bunch of wires...
Processor
Input
Control
Memory
Datapath Output
I/O Devices
I/O buses tap into the processor-memory bus via bus adaptors:
Processor-memory bus: mainly for processor-memory traffic
I/O buses: provide expansion slots for I/O devices A small number of backplane buses tap into the processor-
memory bus
Apple Macintosh-II
Processor-memory bus is used for processor memory traffic
NuBus: Processor, memory, and a few selected I/O devices
I/O buses are connected to the backplane bus
SCSI Bus: the rest of the I/O devices
Advantage: loading on the processor bus is greatly reduced
Datorteknik F1 bild 11 Datorteknik F1 bild 12
Processor-Memory Bus Memory Bus
PA[3:2] 1
32 Each RAM bank
Release Pipe STALL 00xx 01xx 10xx 11xx
is only accessed
Continue Burst read from RAM
every fourth cycle
PA[3:2] 4 2 3 on burst read
Every device on the bus must run at the same clock rate Fast
To avoid clock skew, they cannot be long if they are fast Cons
Clock skew limits bus length
Asynchronous bus:
All devices work on the same speed (clock)
It is not clocked
It can accommodate a wide range of devices Suitable for Processor-Memory Bus
It can be lengthened without worrying about clock skew
It requires a handshaking protocol
wired-OR
Advantage: simple
Disadvantages:
Cannot assure fairness:
A low-priority device may be locked out indefinitely Used in essentially all processor-memory busses and in high-
The use of the daisy chain grant signal also limits the bus speed speed I/O busses
Datorteknik F1 bild 27 Datorteknik F1 bild 28
BReq
BG
R/W
Address Cmd+Addr
Slave DataReady
requests
bus Ack
Graphics Adapter
Sound Card
CP0 RAM
DMA Processor
IM DE EX DM 2nd level
Cache 1) Generates BusRequest, waits for Grant
1st level Cache 2) Put Address & Data on Bus
TLB 3) Increase Address, back to 2 until finished
We want to move 4) Release Bus
data from HD interface to RAM
(1)
Generates interrupt only
HD Interface When finished
If an error occurred
Why go all the way to the CPU (1)
and back to the memory bus (2)
A TLB in the DMA processor (needs updating) Routing All DMA though CPU
No good, spoils the idea!
If DMA uses Physical address
Only transfer within one Page Software handling of DMA
Cache: Flush selected cache lines to RAM
We give the DMA a set of Physical addresses
Cache: Invalidate selected cache lines
(local TLB copy)
TLB/OS: Do not allow access to these pages until DMA finished
Hardware Cache Coherence Protocol
Complex, but very useful for multi processor systems