Buses and Interconnection
In questa pagina 6
In questa pagina 4
A bus is a set of shared lines connecting two or more devices. Only one device at a time can transmit, otherwise the signals overlap. The system bus connects CPU, memory and I/O modules.
The three classes of lines
Property (width of the bus lines)
Lines What they carry Effect of their width data the data and instructions transferred with 32 lines 4 bytes are transferred per cycle; with an 8-bit bus a 32-bit word needs 4 transfers address the source or destination of the datum (memory cell or I/O port) with lines locations are addressed: 24 lines give 16 M locations, 32 lines give 4 G control commands and timing none
Example. With address lines locations are addressed; with data lines bytes are transferred per cycle.
Typical control signals: memory read/write, I/O read/write, transfer acknowledge, bus request and grant, interrupt request and acknowledge, clock, reset.
Using the bus: whoever wants to transmit requests the bus, obtains it and sends; to receive, it requests the bus, sends the request to the other module and waits for the datum.
Arbitration
When several modules want the bus an arbiter is needed:
- centralised: a single controller (arbiter) grants the bus;
- distributed: each module has its own access logic and the modules cooperate.
Single bus and multiple buses
With many devices on a single bus, propagation delay and contention grow and the bus becomes the bottleneck. Solution: a bus hierarchy.
- local bus between CPU and cache;
- system bus between cache/controller and main memory;
- expansion bus for I/O, connected through an interface (bridge) that acts as a buffer: slow peripherals do not slow down CPU-memory traffic.
Timing
Definition (synchronous and asynchronous bus timing)
- Synchronous: a common clock paces the events; each operation lasts a whole number of cycles. Simple, but everyone adapts to the slowest device.
- Asynchronous: one event follows the previous one through handshake signals (for example the master raises "read", the slave answers "data ready"). Slow and fast devices coexist.
Example. With a synchronous bus at MHz (cycle of ns) an operation of cycles lasts ns.
Point-to-point interconnections
Modern systems replace the shared bus with high-speed serial point-to-point links (for example PCI Express, Intel QPI): no arbitration on a common medium, more transfers in parallel on different links.
Typical mistakes
- Confusing the width of the data bus (how many bits per transfer) with the width of the address bus (how much memory is addressed).
- Computing the address space as instead of .
Versione ripasso
A bus is a shared set of lines, one transmitter at a time; the system bus links CPU, memory and I/O.
Lines
- Data: bits per transfer (32 lines means 4 bytes per cycle; an 8-bit bus needs 4 transfers for a 32-bit word).
- Address: lines address locations (24 lines: 16 M; 32 lines: 4 G).
- Control: memory and I/O read/write, acknowledge, bus request/grant, interrupt request/acknowledge, clock, reset.
Arbitration and structure
Arbiter centralised or distributed. A single bus becomes the bottleneck: use a hierarchy (local CPU-cache bus, system bus to memory, expansion I/O bus through a bridge buffer).
Timing
Synchronous: common clock, whole cycles, adapts to the slowest device (100 MHz, 3 cycles: 30 ns). Asynchronous: handshake (read, then data ready), slow and fast devices coexist.
Point to point
Serial high-speed links (PCI Express, Intel QPI): no shared-medium arbitration, parallel transfers. Interrupt and DMA signals use the bus (Interrupts and ExceptionsClasses of interrupts; interrupt-driven I/O; hardware and software handling sequence with context saving on the stack; identifying the source (multiple lines, polling, daisy chain, vector); priorities and nested interrupts; exceptions and modes in ARM.Interrupts and Exceptions →, Direct Memory AccessThe DMA module and the information it receives from the CPU; block transfer with a single final interrupt; cycle stealing and burst mode, points where the CPU may be suspended; bus configurations; channels and I/O processors; quantitative comparison with interrupt-driven I/O.Direct Memory Access →).
Typical mistakes: data-bus width is not address-bus width; address space is , not .