AMBA AXI · Module 3
Handshake Dependency & Deadlock Rules
The AXI dependency rules that prevent deadlock — VALID never waits for READY, and the cross-channel ordering (B after W, R after AR) that keeps the dependency graph acyclic.
Decoupled channels (2.4) and backpressure (3.3) give AXI its performance — and its capacity to deadlock, if the channels are allowed to wait on each other in a cycle. This chapter is the rule set that makes all that concurrency safe: the single-channel rule you met in 3.1 (VALID never waits for READY), now generalized to a cross-channel dependency graph. The whole trick is one idea — keep the dependency graph acyclic. AXI4's dependency rules are precisely the constraints that forbid a cycle, so a transaction can always make forward progress. Get a dependency direction wrong and you get a hang that no amount of waiting resolves. This is the Critical payoff of Module 3; grounded in AMBA AXI4 §A3.3.
1. Deadlock Is a Cycle of Waiting
Deadlock has one shape: a cycle of "I'll move after you move." If A waits for B and B waits for A, neither ever moves. On a handshake that's the cardinal-rule violation from 3.1 in its purest form — the source waits for READY and the destination waits for VALID, so neither signal ever asserts.
So the rule that prevents single-channel deadlock is exactly the cardinal rule: a source asserts VALID from its own data, never waiting for READY. That breaks the cycle — the source always moves first, so the destination's READY (which may wait for VALID) eventually fires. One non-waiting side is all it takes.
2. The Deadlock on a Waveform
A handshake deadlock has an unmistakable signature: both VALID and READY flat-low forever, with the transaction never completing.
Deadlock — VALID waits for READY (both flat low)
8 cyclesContrast this with backpressure (3.3), where VALID is high and READY is low (a legitimate stall that resolves when the destination is ready). Deadlock is both low and never resolving. Telling these two apart on a capture is a core skill: high-VALID/low-READY is flow control; low-VALID/low-READY-forever is a dependency bug.
3. From One Channel to Many
The single-channel rule generalizes. AXI has five channels, and they're allowed to depend on each other in specific directions — a master may legitimately wait for one thing before doing another. The danger is that these cross-channel waits could form a cycle across channels even if each channel individually obeys the cardinal rule. AXI4's dependency rules (§A3.3) are exactly the set of allowed dependencies chosen so that no cycle can form.
The rules come in two flavors:
- "may depend on" (optional): a
READYmay wait for the correspondingVALID(the destination may wait to see an offer). These are the slave/master conveniences. - "must not depend on" (forbidden): a
VALIDmust never wait for itsREADY— on any channel. This is the cardinal rule applied five times. - "must follow" (required ordering): some events must happen after others — the write response after the write data, the read data after the read address. These are mandatory orderings, not just allowances.
Put together, every dependency arrow points "forward" (a VALID enabling a READY, or an earlier event enabling a later one) and never backward into a VALID from its own READY — so the graph is a DAG, and a DAG cannot deadlock.
4. The AXI4 Dependency Graph
Here is the write path's dependency graph — the legal arrows. Read an arrow X → Y as "Y may be asserted depending on X" (Y is allowed to wait for X). The read path is the same shape with AR and R.
The forbidden arrows are the ones you don't see: nothing points from AWREADY back to AWVALID, from WREADY to WVALID, from BREADY to BVALID, or (on the read side) from ARREADY/RREADY to their VALIDs. Each VALID is a graph source with no incoming dependency from its own READY. That's the acyclic guarantee, stated as a picture.
5. The Mandatory Orderings
Two arrows in that graph are not "may" but "must" — required orderings that hold every transaction together:
- Write: B must follow W. The slave must not assert
BVALIDuntil it has accepted the write data — i.e., after theW-channel handshake of the last beat (WLAST). A response before the data is a protocol violation (and a correctness disaster: the master thinks the write landed when it didn't). - Read: R must follow AR. The slave must not assert
RVALIDuntil the address has been accepted (theARhandshake completed). You can't return read data for an address you haven't taken.
These orderings are causal — the answer can't precede the question — and they're the only "must follow" dependencies in the base protocol. (The slave may also wait for the write address before responding, but the hard rule is B-after-data.)
The dependency rules, as a set of guardrails:
// Conceptual — the AXI4 dependency rules (AMBA AXI4 §A3.3), as guardrails:
// 1. A SOURCE asserts VALID from its own data — NEVER waits for READY. (no self-cycle)
// 2. A DESTINATION may assert READY before or after VALID. (either is legal)
// 3. Write response: BVALID only AFTER the write data is accepted (WLAST). (B follows W)
// 4. Read data: RVALID only AFTER the AR handshake completes. (R follows AR)
// Rule 1 broken on any channel, OR a dependency cycle across channels → DEADLOCK.6. AXI3 vs AXI4 — A Relaxed Dependency
One historical note that's interview-relevant: AXI3 had a stricter write dependency — in effect, write data ordering was tied more tightly to the address. AXI4 relaxed it so the write data may arrive before, with, or after the write address (the decoupling from 2.4). This relaxation removed a dependency, which can only make the graph "more acyclic," never less — so it's safe. The lesson: AXI4's dependency set is the minimal one needed to prevent deadlock while maximizing decoupling; AXI3 was slightly more constrained. When bridging AXI3↔AXI4, this is one of the behaviours a converter must reconcile (Chapter 2.5).
7. How a Violation Deadlocks
Concretely, two ways to create a cycle and hang the bus:
- Single-channel (the classic): a source codes
VALID = f(READY)—awvalid <= awready, say. NowAWVALIDwaits forAWREADY, and a slave that (legally) waits forAWVALIDbeforeAWREADYcompletes the cycle. Both flat-low forever (Figure 2). - Cross-channel (the subtle one): a master that refuses to accept read data (
RREADYlow) until it finishes a write, while the thing blocking the write is downstream of that same master's read traffic — a loop through the system, not one channel. Interconnects and bridges are where these arise, because they couple channels that the base rules kept independent. The defense is the same: never let aVALID(or an "accept") wait on something that ultimately waits on it.
The rules in §4–5 guarantee the base protocol is deadlock-free; system-level deadlocks come from logic layered on top (a master/bridge that adds its own cross-channel dependency). So "AXI can't deadlock" is true of the protocol and false of careless integration — which is exactly why this chapter is Critical.
8. Common Misconceptions
9. Debugging Insight
10. Verification Insight
11. Interview Questions
12. Summary
Deadlock is a cycle of waiting, and AXI prevents it by keeping the dependency graph acyclic. The foundation is the cardinal rule from 3.1 applied to every channel: a VALID must never wait for its READY — each VALID is an independent source, so some side always moves first. On top of that, AXI4 (§A3.3) defines which dependencies are allowed (a READY may wait for its VALID) and which are required (the mandatory orderings: B must follow the accepted write data, R must follow the accepted read address — the answer can't precede the question). Every arrow points forward; none feeds a READY back into its own VALID; the graph is a DAG and a DAG cannot deadlock.
Distinguish the failure from backpressure: backpressure is VALID high / READY low and resolves; deadlock is both low forever, or a cross-channel cycle, and never resolves. And remember the scope: the protocol is deadlock-free, but integration logic — masters, bridges, interconnects that couple channels — can add a back-edge and hang the system, which is why this is Critical. Debug a hang by finding the cycle in the wait-for graph and removing the illegal dependency; verify it with structural rule-assertions plus liveness timeouts. Next: the recurring handshake bugs that turn these rules into war stories.
13. What Comes Next
You have the rules that keep concurrency safe. Module 3 closes with the field guide to getting them wrong:
- 3.6 — Common Handshake Bugs (coming next) — the recurring handshake mistakes (dropped VALID, combinational READY loops, ordering violations) and how to spot each.
Previous: 3.4 — Handshake Throughput. For the broader protocol catalog, see the AMBA family overview doc.