AMBA AXI · Module 9
Locked Access (Legacy AXI3)
AXI3's locked access mode — hard bus locking for atomicity — how it worked, why it serialized the interconnect, why AXI4 removed it in favor of exclusive access, and what AXI3→AXI4 bridges must do about it.
This is a short, historical chapter on a feature AXI4 deliberately removed: locked access. In AXI3, AxLOCK was 2 bits and offered three modes — normal, exclusive, and locked — where locked access achieved atomicity by hard-locking the interconnect so no other master could interpose. It worked, but it was a throughput catastrophe: locking the fabric serializes everyone. AXI4 dropped it (shrinking AxLOCK to 1 bit, normal/exclusive only — Chapter 6.4), keeping the far better exclusive access (Chapter 9.3) as the sole atomicity mechanism. Understanding locked access matters mainly for legacy AXI3 designs and AXI3↔AXI4 bridges.
1. What Locked Access Was
In AXI3, a master could mark a transaction (or sequence) locked via AxLOCK = 2'b10. A locked access told the interconnect: do not let any other master access the target until I issue an unlocked transaction. The interconnect would hold off all other masters' traffic to that subordinate (often the whole path) for the duration of the locked sequence. This guaranteed atomicity by exclusion — a locked read followed by a locked write could not be interposed by another master, so the read-modify-write was atomic simply because nobody else could get in.
It was the brute-force way to do atomics: instead of detecting interference (exclusive access), it prevented it by locking everyone out.
2. On the Wire
A locked sequence drove AxLOCK = 2'b10 and held the lock until an unlocked transaction released it:
locked-access — AXI3 locked read/write sequence (AxLOCK=10)
7 cycles3. Why AXI4 Removed It
Locked access was removed because its costs vastly outweighed its benefit:
- It destroys concurrency. Locking the fabric serializes all traffic through it — the entire outstanding-transaction, multi-master, out-of-order model (Module 8) is suspended while one master holds the lock. Throughput collapses for everyone, not just the lock holder.
- It risks deadlock. If a locked transaction can't make progress (a slow or stuck subordinate), the whole interconnect is frozen behind it — a single point of failure for the entire fabric.
- It's complex to implement. The interconnect must track lock ownership, arbitrate lock/unlock, and guarantee the lock is always released — significant logic for a rarely-needed feature.
- Exclusive access does the same job better. Exclusive access (9.3) achieves atomic read-modify-write without blocking anyone: it detects interference via the monitor and retries on failure, so other masters flow freely. It's strictly superior — same atomicity, no serialization, no deadlock risk.
So AXI4 shrank AxLOCK to 1 bit (normal/exclusive) and made exclusive access the only atomicity mechanism. Locking by exclusion gave way to atomicity by detection-and-retry.
4. AXI3 ↔ AXI4 Migration
Because AXI4 has no locked mode, bridging an AXI3 master that uses locked access to an AXI4 (or AXI4 subordinate) side needs care:
- A locked AXI3 transaction has no direct AXI4 equivalent —
AxLOCK=2'b10simply isn't representable in AXI4's 1-bit field. - A bridge must either reject/avoid locked sequences, convert the intent to exclusive access (non-trivial — different semantics), or, if it must preserve locking, enforce the exclusion itself by serializing at the bridge (re-creating the throughput cost locally).
- The
AxLOCKwidth difference (2-bit AXI3 vs 1-bit AXI4) must be handled in the bridge's signal mapping, and the absence of locked on the AXI4 side documented.
In practice, modern designs avoid locked access entirely and use exclusive access, so the migration concern is mainly about legacy AXI3 IP that still issues locked transactions.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
Locked access is a removed AXI3 feature: AxLOCK=2'b10 let a master hard-lock the interconnect so no other master could interpose, guaranteeing atomicity by exclusion. It worked but was a liability — locking the fabric serializes all traffic (suspending the whole concurrency model), risks fabric-wide deadlock if the lock is never released, and is complex to implement. Since exclusive access (9.3) achieves the same atomic read-modify-write by detection and retry without blocking anyone, AXI4 removed locked access and shrank AxLOCK to 1 bit (normal/exclusive only — 6.4).
The practical relevance is legacy and migration: AXI3↔AXI4 bridges must handle the absent locked mode and the 2-bit↔1-bit AxLOCK width difference (avoid, convert to exclusive, or serialize locally — never freeze the whole new fabric). The deeper lesson is the design philosophy: atomicity by detection beat atomicity by exclusion because most atomics are uncontended, so the optimistic, non-blocking, retry-on-conflict approach is dramatically better on a high-throughput interconnect. Next, the final Module 9 chapter zooms out to where AXI ordering ends — the boundary into cache-coherency protocols (ACE/CHI) and memory barriers.
10. What Comes Next
You've seen the legacy atomicity mode; next, where AXI's ordering model reaches its limit:
- 9.5 — Memory Barriers & Coherency Boundary (coming next) — where AXI ordering ends and cache-coherency protocols (ACE/CHI) and memory barriers begin.
Previous: 9.3 — Exclusive Access. Related: 6.4 — AxLOCK & AxCACHE for the AxLOCK encoding change, and 9.3 — Exclusive Access for the mechanism that replaced locked. For the broader protocol catalog, see the AMBA family overview doc.