Buses

Cards (37)

  • parallel buses are the natural choice of data transmission within the CPU because they transfer more than one bit at a time, they have the potential of higher data rates than serial buses.
  • Contrary for the latest advancements of technology serial buses are preferred. For example, USB has replaced PS/2.
  • Parallel buses have a variety of disadvantages which is why they are less preferred in latest technology advancements because:
    • Parallel buses need to be protected against crosstalk, i.e. the unwanted impact of data transferred in one wire onto those transferred in another wire.
    • They need more space than serial buses. This is a problem in itself; additionally, if such buses are not integrated in the mainboard, it can lead to cooling problems.
  • Synchronisation of data transmission;
    Handshaking;
    • DR (data ready). This signal (either “0” or “1”) is set by the sender and read by the receiver. If it is “1” then the sender wishes to indicate that new data are available on the bus.
    • DAC (data accepted). This signal (again “0” or “1”) is set by the receiver and read by the sender. If it is “1” then the receiver indicates that data have been read from the bus.
  • First classification of buses:
    Unidirectional vs Bidirectional
  • Unidirectional vs Bidirectional;
    Unidirectional connects two devices with fixed roles:
    • One device is always the sender of the data.
    • The other device is always the receiver.
  • Unidirectional vs Bidirectional;
    A Bidirectional bus connects the two devices that both can be sender and receiver.
  • Examples:
    • unidirectional: address bus between CPU and memory
    • bidirectional: data bus between CPU and memory
  • Advantages of unidirectional buses:
    • no agreement necessary between devices about their role.
  • Advantages of bidirectional buses:
    • more flexible regarding the type/number of devices connected
  • Second classification: parallel vs serial
  • Serial vs Parallel:
    • Since computers normally process a word of several bits in parallel, it seems reasonable to transfer such a word in parallel, too. This is done by a parallel bus, which basically consists of nothing but n wires in parallel (where n corresponds to the length of the word to be transferred).
    • A serial bus transfers a word one bit after another. To this end, the word is decomposed by the sending device and recomposed by the receiving device.
  • parallel buses are preferred because they're communication protocol is simpler, serial buses had been preferred for long distance data transfer at high clock rates. Serial buses outperform parallel buses in today's computers as they can be operated at extremely high clock rates.
  • Third classification: point-to-point vs multipoint
  • Examples (point-to-point):
    • buses between ALU and Control Unit
    • LPT
    • PS/2
    • AGP bus
  • Examples (multipoint):
    • ISA bus
    • PCI/PCI-X
    • PCI Express
    • USB
  • the use of multipoint is more versatile as it is implemented in USB and PCI systems, the control of multipoint buses is more sophisticated than that of point-to-point buses.
  • Synchronous Transmission:
    Here, sender and receiver have the same clock. This means that a constant stream of data can be transmitted.
  • Asynchronous transmission
    Here, sender and receiver have different clocks. This means that two problems can occur:
    • The same data are mistakenly read multiple times by the receiver (if the receiver is faster than the sender) or
    • some data are missed by the receiver (if the receiver is slower than the sender).
  • there are various ways of organising a reliable asynchronous data transmission such include handshaking
  • Handshake protocol SIMPLE:
    The receiver observes the signal DR. It can only read data from the bus if DR = 1 and DAC = 0, and with DAC = 1 it reports that data have been read. There is no signal when new data are generated (to this end, we would have to observe the DR = 0 signal as well) or when the receiver is ready again to read data
  • Positive effect of protocol SIMPLE: The receiver cannot read data if the sender is not ready.
  • Problems of protocol SIMPLE:
    • A slow receiver might miss a DR = 1 signal and, hence, data.
    • A fast receiver might read the same data twice.
  • Handshakes protocols:
    • SIMPLE
    • SEMI
    • FULL
  • Handshake protocol SEMI:
    • The receiver observes the signal DR. It can only read data from the bus if DR = 1 and DAC = 0, and with DAC = 1 it reports that data have been read. There is no signal when new data are generated (to this end, we would have to observe the DR = 0 signal as well) or when the receiver is ready again to read data
    • The sender observes the signal DAC. It waits for DAC = 1 before invalidating its current data by setting DR = 0.
  • Positive effects of protocol SEMI:
    • The receiver cannot read data if the sender is not ready.
    • A slow receiver cannot miss any data, because new data are not made available while the receiver is still processing the old ones.
  • Problem of protocol SEMI:
    • A fast receiver might still read the same data twice. This is because it can produce a full cycle DAC = 0, DAC = 1, DAC = 0, while the sender has not changed its signal DR from 1 to 0 yet. Thus, we would have the situation DR = 1 and DAC = 0, which enabled the receiver to read data.
  • Handshaking protocol FULL:
    • The receiver observes the signal DR. It can only read data from the bus if DR = 1 and DAC = 0, and with DAC = 1 it reports that data have been read. There is no signal when new data are generated (to this end, we would have to observe the DR = 0 signal as well) or when the receiver is ready again to read data
    • The receiver waits for the signal DR = 0 before setting DAC = 0. Hence it cannot read any data before the sender has produced new ones.
  • Bus controller (Access to the bus needs to be controlled, i.e. for any point in time those devices need to be selected that are allowed to use the bus.).
    We consider three important example methods of bus control:
    • daisy chaining
    • polling
    • independent request
  • Daisy Chaining
    • All devices attached to the bus are sequentially connected by a special wire for a signal BAV (“bus available”).
    • A device can only use the bus if it receives BAV.
    • BAV is fed by the bus controller into the first device in the chain (a, possibly adjustable, priority decides on which device is the “first” one).
    • If a device receives the signal BAV and does not want to use the bus, it forwards the signal to the next device on the chain; otherwise, it does not forward it.
    • Hence, the location in the chain decides on the priority of the device
  • Polling
    • The bus controller consecutively generates the device addresses of all devices attached to the bus (in accordance with a, possibly adjustable, priority).
    • This device address is forwarded to all devices.
    • If a device recognises its address and wants to use the bus, it blocks the usage for other devices by sending a BUSY signal to them
  • Independent request
    • Each device that is connected to the bus can send a REQUEST signal to the bus controller if it wants to use the bus.
    • The bus controller ranks all requests in accordance with a, possibly adjustable, priority and sends a GRANT signal to the device selected.
    • The selected device blocks the usage of the bus for other devices by sending a BUSY signal to them
  • parallel vs serial: Parallel buses transfer all bits of a word in parallel, whereas serial buses transfer them one bit after another
  • 3. point-to-point vs multipoint: Point-to-point buses connect two devices, multipoint buses connect more than two devices.
  • unidirectional vs bidirectional: Unidirectional buses connect two devices with fixed roles - one is always the sender and the other one is always the receiver. Bidirectional buses connect devices that can be both sender and receiver
  • examples of the types of buses:
    1. parallel: ATA bus, AGP bus
    2. serial: USB, S-ATA bus
    3. point-to-point: buses between ALU and control unit, AGP bus
    4. multipoint: PCI, USB
  • What do the terms DR and DAC in Handshaking stand for?
    • DR stands for data ready. It is a signal from the sender to receiver and it indicates whether data are ready to be read by the receiver.
    • DAC stands for data accepted. It is a signal from the receiver and it indicates that the receiver has read the data provided