CDA-4101 Lecture 10 Notes



Buses

  • More detail about how buses work

CPU Pins

  • The CPU pins are the focal point for what happens on the buses
  • Three broad categories of pins type on processor:
    1. address
    2. data (input, output or both)
    3. control
  • these are the only means of communication the processor has with the rest of the system

CPU Control Pins


Buses


Bus Protocols

bus protocol - the specification or agreement between al the devices about how they will communicate


Masters and Slaves

  • a bus transaction is a request from one device to another
  • the requesting device acts as the controlling device and is called the master
  • the request acts as the servicer and it called the slave
  • the role a device takes in a bus transaction is what determines if it is a master or slave
  • the same device can act as master and slave at different times.

Drivers, Receivers and Transceivers

  • many devices (especially CPUs) are designed to consume as little power as possible.
  • their electrical signals are not that strong
  • current traveling a long a long bus or being fed to multiple devices needs to be amplified
  • bus driver connects a master to the bus and amplifies its signals
  • bus receiver connects a slave to a bus
  • bus transreceiver combination of driver and receiver for devices that can act as both master and slave

Bus Width


Bus Skew


Multiplexed Bus


Bus Clocking


Synchronous Bus Example


Synchronous Bus Example (cont.)


Asynchronous Buses


Bus Arbitration


Centralized Arbitration Example


Centralized Arbitration Example (cont.)


More Centralized Arbitration Issues


Decentralized Arbitration


Decentralized Arbitration Example I


Decentralized Arbitration Example II

Note that the textbook does not explain what role the "bus request" line plays in this scheme and does not explain what need to happen when two devices simultaneously try to grab the bus. i.e., there are many subtle issues that need to be resolved to make this work flawlessly.

Block Transfers


Atomic Operations

  • as you will see in operating systems, a common issues with concurrent programs is ensuring two programs (or two processors) do not try to access the same data at the same time.
  • you can keep a flag to indicate that data is in use, but you wind up with the same problem, only now concerning simultaneous access to the flag
  • the read, modify, write of a memory location requires many steps, and if these steps are interleaved in the wrong way, you get the wrong results for two parallel accesses
  • to properly synchronize programs and/or processors requires having an atomic operation for modifying a memory location
  • atomic simply means that it is done as a single indivisible operation, so it is impossible for two things to modify it at the same time
  • "read-modify-write" bus cycle ensures that the processor can read, modify and write to memory with nothing interrupts it.
  • this is yet another specialized bus state

Buses and Interrupt Handling


Interrupt Controller Example: 8259A