AMBA AHB · Module 10
Why Arbitration Exists
Why a shared multi-master AHB needs an arbiter — only one master can drive the shared wires at a time — and what the arbiter decides: which master owns the bus (the policy), when ownership changes (between transfers), and signaling the current master to the fabric.
This opens Module 10 — Arbitration & Multi-Master AHB, which covers how multiple masters share one bus. The starting question: why is an arbiter needed at all? The answer is physical: a shared AHB has one set of address, control, and write-data wires, so only one master can drive them at a time — if two drove them at once, their signals would collide and corrupt. So the bus needs an owner at any moment, and an arbiter decides who. The arbiter grants bus ownership to exactly one master at a time, deciding who gets it (the arbitration policy, chapters 10.5–10.6), when ownership changes (between transfers, not mid-transaction), and signaling the fabric which master is current (HMASTER, chapter 10.3). Single-master AHB-Lite has no arbiter (no contention). So arbitration exists because a shared bus has one physical owner at a time, and the arbiter serializes the competing masters' access.
1. What Is It?
Arbitration is the mechanism by which an arbiter grants ownership of a shared multi-master bus to exactly one master at a time. It exists because the bus is shared:
- A shared AHB has one set of address, control, and write-data wires (HADDR, HTRANS, HWRITE, HWDATA, etc.).
- Only one master may drive these wires at a time — two masters driving at once would collide (corrupted signals).
- So the bus needs an owner, and the arbiter decides which master owns it.
The arbiter is the bus's traffic controller. Masters that want the bus request it; the arbiter grants it to one. The arbiter decides three things: who gets the bus when several request it (the arbitration policy — fixed-priority, round-robin, etc., chapters 10.5–10.6); when ownership changes (at clean points between transfers, not mid-transaction, chapters 10.8–10.9); and it signals the fabric which master is current (via HMASTER, chapter 10.3, so slaves and the interconnect know who they're talking to). So the arbiter serializes the masters' access to the shared bus — only one drives at a time, in an order the arbiter decides.
2. Why Does It Exist?
Arbitration exists because a shared bus is a shared physical resource — one set of wires — that only one driver can use at a time, yet multiple masters want it. Something must serialize their access, and that's the arbiter.
The physical fact is fundamental: the bus's wires (HADDR, HWDATA, etc.) can be driven by only one source at a time — two drivers would create electrical contention (drive-fight) and corrupt the signals. So the bus is a mutually exclusive resource: one owner at a time. But a multi-master system has several masters (a CPU, a DMA engine, etc.) that each need the bus. So there's a conflict: many want it, only one can have it. Arbitration exists to resolve this conflict — to decide which master gets the bus at each moment, ensuring only one drives at a time. Without arbitration, masters would collide on the shared wires. So arbitration is the necessary mechanism for sharing a single-owner resource among multiple contenders.
The reason the arbiter decides who (the policy) is that, when multiple masters request the bus simultaneously, some rule must pick one. Different rules (fixed-priority, round-robin) give different fairness/performance trade-offs (chapters 10.5–10.7), but a rule is needed — the arbiter can't grant to two. So the arbitration policy exists to make the who-gets-it decision deterministically. This is the heart of arbitration: the policy that resolves simultaneous requests. (The choice of policy is a design decision covered later; here the point is that a policy is needed.)
The reason ownership changes between transfers (not mid-transaction) is to ensure clean handover (chapters 10.8–10.9): a transfer (or a burst, or a locked sequence) must complete on the bus before another master takes over, or the bus state would be inconsistent (a half-done transfer interrupted). So the arbiter changes ownership at transfer boundaries — granting a new master only when the current one's transaction reaches a clean point. This is why arbitration interacts with transfers, bursts, and locks: ownership changes are coordinated with transaction boundaries. So arbitration exists not just to pick an owner but to hand the bus over cleanly — which requires changing ownership at the right (between-transaction) moments. The arbiter's job includes when, not just who.
3. Mental Model
Model arbitration as a single microphone at a meeting that only one person can speak into at a time — a moderator decides who gets the mic, hands it over between speakers (not mid-sentence), and announces who's speaking.
At a meeting (the multi-master system), there's one microphone (the shared bus) — only one person can speak into it at a time, or you get noise (signal collision). Many people want to speak (multiple masters request the bus). So a moderator (the arbiter) manages it: when several raise their hands (request the bus), the moderator decides who gets the mic (the arbitration policy), hands it over between speakers — waiting for one to finish their point before passing it, not interrupting mid-sentence (ownership changes between transactions) — and announces who's speaking so everyone knows who to listen to (signals the current master, HMASTER). Without a moderator, everyone would talk at once into the one mic — chaos. The moderator serializes the speakers, one at a time, in a decided order.
This captures arbitration: one microphone = the shared bus (one driver at a time); many wanting to speak = multiple masters requesting; the moderator deciding who = the arbitration policy; handing over between speakers, not mid-sentence = ownership changing between transactions; announcing the speaker = signaling the current master. The moderator (arbiter) serializes access to the single shared resource.
Watch the arbiter grant the bus to one master at a time:
The arbiter grants the bus to one master at a time
4 cyclesThe model's lesson: the arbiter hands the single mic to one speaker at a time. In the waveform, both masters request, but the grant goes to exactly one at a time — CPU first, then DMA — never both. The arbiter serializes the contention: one owner, decided by the policy, handed over cleanly between transactions.
4. Real Hardware Perspective
In hardware, the arbiter is a block in the interconnect that takes the masters' request signals (HBUSREQ) and produces grant signals (HGRANT), driving HMASTER to the fabric — and it's part of the multi-master AHB infrastructure that AHB-Lite omits.
The arbiter block sits in the multi-master AHB interconnect (chapter 12.x). Its inputs are the masters' HBUSREQ signals (each master's request, chapter 10.2); its outputs are the HGRANT signals (granting one master) and HMASTER (the current master's ID, chapter 10.3). Internally, it implements the arbitration policy (fixed-priority, round-robin, etc.) — combinational or sequential logic that picks one requesting master to grant. So the arbiter is concrete hardware: request inputs, grant/HMASTER outputs, policy logic. It's the central coordinator of the multi-master bus.
The single-grant invariant is the arbiter's core guarantee: at any time, at most one master is granted (HGRANT asserted to one master). This is what prevents collisions — only the granted master drives the bus. So the arbiter's logic ensures the grants are mutually exclusive: never two masters granted at once. This invariant is the hardware embodiment of "one owner at a time." The granted master drives the bus; the others wait (with their HBUSREQ asserted, but not granted). So in hardware, arbitration is the arbiter maintaining the single-grant invariant — exactly one owner.
The clean-handover timing is a hardware detail (chapters 10.8–10.9): the arbiter changes the grant at transfer boundaries, and the granted master begins driving the bus at the start of its transfer. There's a defined timing for when a newly-granted master takes the bus (after the current transaction completes, accounting for the pipeline). So the arbiter doesn't just pick a winner; it coordinates when the winner takes over, ensuring the previous master's transaction finishes cleanly first. This timing (covered in detail later) is what makes the handover glitch-free — no two masters driving during the transition. So the arbiter's hardware includes the handover-timing logic.
The AHB-Lite contrast is concrete: AHB-Lite has no arbiter (and no HBUSREQ/HGRANT/HMASTER arbitration signals) because it's single-master — one master, no contention (chapter 7.8, 14.x). So multi-master arbitration is a feature of full AHB; AHB-Lite drops the whole arbitration infrastructure. In a system needing multiple masters, this is handled either by full AHB's arbiter (legacy) or, more commonly today, by an interconnect/bus matrix (chapter 12.x) that gives masters separate paths (so they don't contend on one bus) — or by AXI. So the arbiter is the full-AHB approach to multi-master; modern systems often use interconnects instead. So in hardware, the arbiter exists in full multi-master AHB, absent in AHB-Lite, and complemented/replaced by interconnects in modern designs.
5. System Architecture Perspective
At the system level, arbitration is the mechanism for multi-master coordination on a shared bus — letting several masters (CPU, DMA, etc.) share one bus — and its policy determines the fairness and performance of that sharing, while modern designs increasingly use interconnects to avoid contention.
The multi-master need is real: systems have multiple masters — a CPU, one or more DMA engines, perhaps a display controller or accelerator — that each need to access memory and peripherals. On a shared bus, they contend, and arbitration coordinates them. So arbitration is what makes a multi-master shared bus work — without it, the masters couldn't share the bus. So at the system level, arbitration is the enabler of multi-master operation on a shared bus: it lets the system's several masters coexist on one bus, serialized by the arbiter.
The policy determines fairness/performance (chapters 10.5–10.7): the arbitration policy decides which master wins contention, which affects each master's latency (how long it waits for the bus) and the system's fairness (whether some master is starved). Fixed-priority favors high-priority masters (low latency for them, possible starvation for others); round-robin is fairer (no starvation) but doesn't prioritize. So the policy is a key system tuning knob — an architect chooses it to meet the masters' latency/priority needs. So arbitration isn't just "share the bus"; it's "share the bus with a chosen fairness/performance profile." The policy choice shapes the multi-master system's behavior. (Chapters 10.5–10.7 cover the policies and starvation.)
The modern trend toward interconnects is the key architectural evolution: rather than have masters contend on a single shared bus (requiring arbitration), modern systems use an interconnect/bus matrix (chapter 12.x) that gives each master its own path to the subordinates, so they don't contend (they only conflict when accessing the same subordinate, handled by per-subordinate arbitration). So the trend is to reduce contention by topology (separate paths) rather than manage contention on a shared bus. And for high concurrency, AXI (with its independent channels and outstanding transactions) further reduces the need for bus-level arbitration. So while arbitration is the classic multi-master-AHB mechanism, modern systems often minimize it via interconnects and AXI. Understanding arbitration is still essential (it underlies interconnect arbitration too, and legacy systems), but the architectural direction is toward less contention. So arbitration's system role is enabling multi-master sharing, with the policy shaping fairness/performance, increasingly within interconnects rather than on a single shared bus.
6. Engineering Tradeoffs
Arbitration reflects the share-a-single-resource design.
- Arbitration vs no sharing. Arbitration lets multiple masters share one bus (saving wires/area vs separate buses) at the cost of contention (masters wait for the bus) and the arbiter's complexity. Without sharing, each master would need its own bus (more area). Arbitration is the trade for sharing.
- Shared bus (arbitration) vs interconnect (separate paths). A shared bus with arbitration is simple (one bus) but serializes masters (contention). An interconnect/bus matrix gives separate paths (concurrency, less contention) at the cost of more area/complexity. Modern systems favor interconnects for concurrency; shared buses for simplicity/cost.
- Policy choice (fairness vs performance). The arbitration policy trades fairness (round-robin: no starvation) against prioritization (fixed-priority: low latency for high-priority masters, possible starvation). The choice depends on the masters' needs (chapters 10.5–10.7).
- Clean handover (between transactions) vs preemption. Changing ownership only between transactions ensures clean handover (no interrupted transfers) at the cost that a master holds the bus for its whole transaction (a long burst delays others). Preemption mid-transaction would be complex and is avoided. AHB hands over cleanly between transactions.
The throughline: arbitration exists because a shared bus has one physical owner at a time, and an arbiter must serialize the competing masters' access — deciding who (the policy), when (between transactions, for clean handover), and signaling the current master to the fabric. It's the mechanism that enables multi-master sharing of one bus, with the policy shaping fairness/performance. The cost is contention (masters wait); modern systems reduce this via interconnects (separate paths) and AXI (native concurrency), but arbitration remains the fundamental shared-resource-coordination mechanism.
7. Industry Example
Trace why arbitration is needed in a multi-master system.
A system has a CPU and a DMA engine, both needing to access shared memory.
- Both masters need the bus. The CPU executes code (fetching instructions, accessing data) and the DMA engine moves data (e.g., a peripheral buffer to memory). Both need to access the shared memory over the bus. They're independent masters, each initiating transfers when it needs to.
- They can't drive the bus at once. The bus has one set of address/data wires. If the CPU and DMA both drove them simultaneously, the signals would collide — corrupted addresses and data. So only one can drive at a time.
- The arbiter serializes them. An arbiter grants the bus to one master at a time. When both request (both want the bus), the arbiter picks one per its policy — say the CPU (if CPU has priority) — and grants it the bus; the DMA waits. When the CPU finishes its transaction (a clean point), the arbiter hands over to the DMA. So the two masters' accesses are serialized — interleaved on the bus, one transaction at a time, never overlapping.
- The policy shapes behavior. If the policy is fixed-priority with the CPU higher, the CPU gets the bus whenever it wants (low CPU latency), and the DMA gets it only when the CPU doesn't — risking DMA starvation if the CPU is bus-heavy. If round-robin, they alternate fairly. So the policy choice (chapters 10.5–10.7) determines each master's latency and fairness. The architect picks it for the system's needs.
- A modern alternative — interconnect. A modern version of this system might use an interconnect/bus matrix (chapter 12.x): the CPU and DMA each have their own path to memory, so they don't contend on one bus — they only conflict if accessing the same memory at the same time, handled by arbitration at that memory's port. So the interconnect reduces contention (separate paths), with arbitration only where paths converge. This is the modern direction — less shared-bus contention.
- AHB-Lite per master. Each master's own connection might be AHB-Lite (single-master, no arbitration on that link), with the interconnect handling the multi-master coordination. So the masters use simple AHB-Lite links, and arbitration happens in the interconnect.
The example shows arbitration's necessity (the CPU and DMA can't drive the shared bus at once, so an arbiter serializes them) and its policy's effect (CPU-priority vs round-robin shaping latency/fairness). It also shows the modern direction: interconnects give separate paths (reducing contention), with arbitration at the convergence points — and masters connect via simple AHB-Lite links. Arbitration enables multi-master sharing; interconnects reduce the contention.
8. Common Mistakes
9. Interview Insight
Why arbitration exists is a foundational interview check — the one-owner-at-a-time physical reason and what the arbiter decides are the signals.
The answer that lands gives the physical reason and the arbiter's role: "A shared multi-master AHB has one set of address, control, and write-data wires, and only one master can drive them at a time — if two drove them at once, the signals would collide and corrupt. But a multi-master system has several masters — a CPU, a DMA, etc. — that each need the bus. So something must serialize their access: the arbiter. The arbiter grants bus ownership to exactly one master at a time. It decides three things: who gets the bus when several request it — the arbitration policy, like fixed-priority or round-robin; when ownership changes — at clean points between transactions, not mid-transfer, so transactions complete cleanly; and it signals the fabric which master is current, via HMASTER, so slaves and the interconnect know who they're talking to. Single-master AHB-Lite has no arbiter — with one master there's no contention. And modern systems often use an interconnect or bus matrix to give masters separate paths, reducing contention, with arbitration only where paths converge." The one-owner physical reason, the who/when/signaling decisions, and the AHB-Lite/interconnect context are the senior signals.
10. Practice Challenge
Reason from why arbitration exists.
- The physical reason. Explain why only one master can drive the shared bus at a time.
- The arbiter's decisions. List the three things the arbiter decides.
- Read the waveform. From Figure 2, explain how the arbiter serializes the two masters.
- Clean handover. Explain why ownership changes between transactions, not mid-transaction.
- AHB-Lite & interconnects. Explain why AHB-Lite has no arbiter and where arbitration appears in interconnects.
11. Key Takeaways
- A shared multi-master AHB has one set of wires — only one master can drive them at a time (else collision) — so the bus needs an owner, decided by an arbiter.
- The arbiter grants bus ownership to exactly one master at a time — maintaining the single-grant invariant (no collisions).
- It decides who (the policy), when (between transactions, for clean handover), and signals the current master to the fabric (HMASTER).
- Ownership changes between transactions, not mid-transaction — so transfers, bursts, and locked sequences complete cleanly before handover.
- Single-master AHB-Lite has no arbiter — no contention; arbitration is a multi-master (full AHB) concept.
- Modern systems reduce contention via interconnects (separate paths, arbitration per subordinate) and AXI — but arbitration remains the fundamental shared-resource-coordination mechanism.
12. What Comes Next
You now understand why arbitration exists. The next chapters cover the arbitration signals and policies:
- 10.2 — HBUSREQ & HGRANT (coming next) — the request/grant handshake that assigns bus ownership.
- 10.3 — HMASTER (coming soon) — how the arbiter signals the current master to the fabric.
For the multi-master context, see Shared Bus vs Interconnect Thinking and Master, Slave, Decoder & Arbiter. For why AHB-Lite drops arbitration, see AHB-Lite Overview. For the broader protocol map, see the AMBA family overview.