What Is A Bus? A Bus Is:: Slow Vehicle That Many People Ride Together A Bunch of Wires..
What Is A Bus? A Bus Is:: Slow Vehicle That Many People Ride Together A Bunch of Wires..
A Bus is:
s
s s
a shared communication link a single set of wires used to connect multiple subsystems
A bunch of wires...
Processor Input Control Memory Datapath Output
Datorteknik F1 bild 1
Datorteknik F1 bild 2
Advantages of Buses
Disadvantage of Buses
I/O Device I/O Device Processor I/O Device I/O Device Memory Processor
I/O Device
Versatility:
New devices can be added easily Peripherals can be moved between computer systems that use the same bus standard
s s
s s
Low Cost:
A single set of wires is shared in multiple ways
Datorteknik F1 bild 3
Datorteknik F1 bild 4
Control lines:
Signal requests and acknowledgments Indicate what type of information is on the data lines
Data lines carry information between the source and the destination:
Data and Addresses Complex commands
s s
Datorteknik F1 bild 5
Datorteknik F1 bild 6
Types of Buses
s
Backplane Bus
I/O Busses
Datorteknik F1 bild 7
Datorteknik F1 bild 8
I/O Devices
s
s s s
Datorteknik F1 bild 9
Advantages: Simple and low cost Disadvantages: slow and the bus can become a major bottleneck Example: IBM PC - AT
Datorteknik F1 bild 10
A Two-Bus System
Processor Memory Bus Processor Bus Adaptor I/O Bus Bus Adaptor I/O Bus Bus Adaptor I/O Bus Memory Processor
A Three-Bus System
Processor Memory Bus Memory Bus Adaptor Bus Adaptor Backplane Bus Bus Adaptor I/O Bus I/O Bus
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
s
Apple Macintosh-II
NuBus: Processor, memory, and a few selected I/O devices SCSI Bus: the rest of the I/O devices
s
Datorteknik F1 bild 11
Processor-Memory Bus
s
Memory Bus
4*32 00xx 01xx 10xx 11xx Each access transfers 128 bits
Cache Miss STALL, Start Burst read from RAM PA[3:2] 1 32 Release Pipe STALL Continue Burst read from RAM PA[3:2] 4 2 3 00xx 01xx 10xx 11xx Each RAM bank is only accessed every fourth cycle on burst read
Datorteknik F1 bild 13
Datorteknik F1 bild 14
Datorteknik F1 bild 15
Datorteknik F1 bild 16
Synchronous Bus
s
Synchronous bus:
Includes a clock in the control lines A fixed protocol for communication that is relative to the clock Advantage: involves very little logic and can run very fast Disadvantages: s Every device on the bus must run at the same clock rate s To avoid clock skew, they cannot be long if they are fast It is not clocked It can accommodate a wide range of devices It can be lengthened without worrying about clock skew It requires a handshaking protocol
Asynchronous bus:
Datorteknik F1 bild 17
Datorteknik F1 bild 18
Asynchronous Bus
s
Asynchronous Protocol
s s s
Slave
DataReady Ack
Datorteknik F1 bild 19
Datorteknik F1 bild 20
Busses so far
Master Slave Control Lines Address Lines Data Lines
Bus Transaction
s s s
Bus Master: has ability to control the bus, initiates transaction Bus Slave: module activated by the transaction Bus Communication Protocol: specification of sequence of events and timing requirements in transferring information. Asynchronous Bus Transfers: control lines (req, ack) serve to orchestrate sequencing. Synchronous Bus Transfers: sequence relative to common clock.
Datorteknik F1 bild 21
Datorteknik F1 bild 22
Bus Arbitration
s s
s s
Bus Master, (initiator usually the CPU) Slave, (usually the Memory)
Datorteknik F1 bild 24
Centralized
Many request/grant lines Complex controller, may be a bottleneck
Self Selection
Many request lines The one with highest priority self decides to take bus
Datorteknik F1 bild 25
Datorteknik F1 bild 26
Req
wired-OR
s s
s s s
All agents operate syncronously All can source / sink data at same rate => simple protocol
just manage the source and target
Datorteknik F1 bild 29
Datorteknik F1 bild 30
s
Data Data1 Data1 Data2
Block transfers:
Allow the bus to transfer multiple words in back-to-back bus cycles Only one address needs to be sent at the beginning The bus is not released until the last word is transferred Cost: (a) increased complexity (b) increased response time (latency) for request
Datorteknik F1 bild 32
s s
Slave indicates when it is prepared for data xfer Actual transfer goes at bus rate
Datorteknik F1 bild 31
Bus parking
master can holds onto bus and performs multiple transactions as long as no other master makes request
CLK Active
s
Datorteknik F1 bild 33
Slave
DataReady Ack
Datorteknik F1 bild 35
Datorteknik F1 bild 36
Backplane Bus
Bus Adapter Control 2nd level Cache Physical Addr Data Primary Memory RAM CP0 IM DE EX DM 1st level Cache TLB
Examples
Raid controllers Graphics adapter
s s s s
Limited number of devices Data transfer bursts at full rate DMA transfers important
small controller spools stream of bytes to or from memory
Datorteknik F1 bild 37
Datorteknik F1 bild 38
DMA Processor
1) Generates BusRequest, waits for Grant 2) Put Address & Data on Bus 3) Increase Address, back to 2 until finished 4) Release Bus
Datorteknik F1 bild 39
Datorteknik F1 bild 40
INCONSISTENCY problem
We change the RAM contents, but not the cache We write to HD but the RAM holds old information
Datorteknik F1 bild 41
Datorteknik F1 bild 42
All transfers are (unlimited) bursts Address phase starts by asserting FRAME# Next cycle initiator asserts cmd and address Data transfers happen on when
IRDY# asserted by master/initiator when ready to transfer data TRDY# asserted by target when ready to transfer data transfer when both asserted on rising edge
FRAME# deasserted when master intends to complete only one more data transfer
Turn-around cycle on any signal driven by more than one agent
Datorteknik F1 bild 43 Datorteknik F1 bild 44
PCI Optimizations
Push bus efficiency toward 100% under common simple usage
like RISC
s
Bus Parking
retain bus grant for previous master until another makes request granted master can start next transfer without arbitration
Datorteknik F1 bild 45
Datorteknik F1 bild 46
s s s s
sBus sData
Locks:
support timesharing, I/O, and MPs
sTransfer sBus
masters
sClocking sProtocol
Datorteknik F1 bild 47
Datorteknik F1 bild 48