Escolar Documentos
Profissional Documentos
Cultura Documentos
Computer Buses
A bus is a common electrical pathway between multiple devices.
Can be internal to the CPU to transport data to and from the ALU. Can be external to the CPU, to connect it to memory or to I/O devices.
BUSES
Early PCs had a single external bus or system bus. Modern PCs have a special-purpose bus between the CPU and memory and (at least) one other bus for the I/O devices.
Physical Implementations
Parallel lines on circuit boards (ISA or PCI) Ribbon cables (IDE)
Physical Implementations (continued) Strip connectors on mother boards (PC104) External cabling (USB or Firewire)
MANISH MAHAJAN
Data Bus
Carries data
Remember that there is no difference between data and instruction at this level
Address bus
Identify the source or destination of data e.g. CPU needs to read an instruction (data) from a given location in memory Bus width determines maximum memory capacity of system
e.g. 8080 has 16 bit address bus giving 64k address space
Control Bus
Control and timing information
Memory read/write signal I/O read/write signal Transfer ACK Bus Request Bus Grant Interrupt request Interrupt Acknowledge Clock signals Reset
10
MANISH MAHAJAN
Aggregate data transfer approaches bus capacity Slower devices dictate the maximum bus speed
Multiple Buses
Most systems use multiple buses to overcome these problems Requires bridge to buffer (FIFO) data due to differences in bus speeds Sometimes I/O devices also contain buffering (FIFO)
Computer Buses
Some devices that attach to a bus are active and can initiate bus transfers. They are called masters. Some devices are passive and wait for requests. They are called slaves. Some devices may act as slaves at some times and masters at others. Memory can never be a master device.
18
MANISH MAHAJAN
19
20
Bus Width
Bus width refers to the data and address bus widths. System performance improves with a wider data bus as we can move more bytes in parallel. We increase the addressing capacity of the system by adding more address lines. Wider the bus the better the data transfer rate or the wider the addressable memory space The address bus determines the system memory addressing capacity. A system with n address lines can directly address 2n memory words. In byte-addressable memories, that means 2n bytes
Time multiplexed
Shared lines Address valid or data valid control line Advantage - fewer lines Disadvantages
More complex control Degradation of performance
Bus Timing
Co-ordination of events on bus Synchronous a bus clock provides synchronization of all bus operations Asynchronous donot use a common bus clock signal; instead, these buses use handshaking to complete an operation by using additional synchronization signals
MANISH MAHAJAN
Asynchronous Timing
Devices must have certain tolerances to provide responses to signal stimuli More flexible allowing slower devices to communicate on same bus with faster devices. Performance of faster devices, however, is limited to speed of bus
1. Typically, the master places all the required data to initiate a bus transaction and asserts the master synchronization signal MSYN. 2. Asserting MSYN indicates that the slave can receive the data and initiate the necessary actions on its part. When the slave is ready with its reply, it asserts SSYN. 3. The master receives the reply and then removes the MSYN signal to indicate receipt. For example, in a memory read transaction, the CPU reads the data supplied by the memory. 4. Finally, in response to the master deasserting MSYN, the slave removes its own synchronization signal SSYN to terminate the bus transaction.
MANISH MAHAJAN
Synchronous OR Asynchronous?
Asynchronous buses allow more exibility in timing. In synchronous buses, all timing must be a multiple of the bus clock. For example, if memory requires slightly more time than the default amount, we have to add a complete bus cycle The main advantage of asynchronous buses is that they eliminate this dependence on the bus clock. However, synchronous buses are easier to implement, as they donot use handshaking.
Bus Arbitration
I/O chips have to become bus master to read and write memory and to cause interrupts. If two or more devices want to become bus master at the same time, a bus arbitration mechanism is needed. Arbitration mechanisms can be centralized or decentralized.
Bus Arbitration
Fair Policies
Hybrid Policies
All bus requests in a predefined window must be satised before granting requests from the next window A bus request should not be pending for more than M milliseconds
Combination of Priority and Fairness Also called Combined Policies E.g. PCI Bus
MANISH MAHAJAN
Transaction-Based Release : A bus master holding the bus releases the bus when its current transaction is finished Demand Based Release : the current master releases the bus only if there is a request from another bus master; otherwise, it continues to use the bus. Typically, this check is done at the completion of each transaction
A potential disadvantage of the non-preemptive policies is that a bus master may hold the bus for a longtime, depending on the transaction type. For example, long block transfers can hold the bus for extended periods of time.
Preemptive
Preemptive policies force the current master to release the bus without completing its current bus transaction.
Polling
In response to the bus request from one or more devices, the controller polls them (in a predesigned priority order) and selects the highest priority device among them and grants the bus to it. Only one bus grant line is shown. But, only the selected device will be activated as bus master (i.e., accepts the bus grant). All the other devices will ignore it.
MANISH MAHAJAN
Independent Requests
The arbiter is connected to each master by separate bus request and grant lines When a master wants the bus, it sends its request through its own bus request line. Once the arbiter receives the bus requests from the masters, it uses the allocation policy to determine which master should get the bus next. Since the bus requests are received on separate lines, the arbiter can implement a variety of allocation policies: a rotating priority policy, a fair policy, or even a hybrid policy. It provides short, constant arbitration times and allows exible priority assignment so that fairness can be ensured. In addition, it provides good fault tolerance. If a master fails, the arbiter can ignore it and continue to serve the other masters This implementation is complex. The number of control signals is proportional to the number of masters.
Decentralized Arbitration
Decentralized bus arbitration is also possible.
A computer could have 16 prioritized bus request lines. When a device wants to use the bus, it assert its request line. All devices monitor all request lines, so at the end of each bus cycle, each device knows whether it was the highest priority requester. This method avoids the necessity of an arbiter, but requires more bus lines. Another decentralized scheme equivalent to the daisy chain arbitration minus the arbiter is shown on the following slide.
Bus Arbitration
46
MANISH MAHAJAN