Skip to content

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.

A locked master blocks other masters at the interconnect; all other traffic to the subordinate is stalled until the lock is released.Locked masterAxLOCK=10Interconnectlocks path → blocksothersSubordinateserved only by lockholderOther mastersSTALLED until unlock12
Figure 1 — AXI3 locked access. A locked master (AxLOCK=10) causes the interconnect to block all other masters from the target subordinate for the duration of the locked sequence, guaranteeing atomicity by exclusion. The cost: every other master is stalled — the fabric serializes around the lock holder.

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 cycles
An AXI3 locked sequence: transactions with AxLOCK 10 hold the interconnect lock; an unlocked transaction with AxLOCK 00 releases it.locked: others blockedAxLOCK=10 → lock fabricAxLOCK=10 → lock fabricAxLOCK=00 → release, others grantedAxLOCK=00 → release, o…aclkaxlock10101010000000lockedother_gntt0t1t2t3t4t5t6
Figure 2 — locked-access: an AXI3 locked sequence. The locked read and write drive AxLOCK=2'b10; while locked, the interconnect refuses other masters access to the subordinate. The final (unlocked) transaction, AxLOCK=2'b00, releases the lock. Atomicity is by exclusion — others are blocked, not monitored.

3. 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.

Locked access blocks others and risks deadlock; exclusive access is non-blocking via monitor and retry; AXI4 keeps only exclusive.Locked (AXI3)block all → serialize, deadlockriskAtomicity by exclusionremoved in AXI4Exclusive (AXI4)monitor + retry, non-blockingAtomicity by detectionthe surviving mechanism12
Figure 3 — why locked was replaced by exclusive. Locked access blocks all other masters (serializes the fabric, risks deadlock) to guarantee atomicity by exclusion. Exclusive access (9.3) uses a non-blocking monitor and retry-on-failure, achieving the same atomicity while other masters keep flowing. Exclusive is strictly better, so AXI4 removed locked.

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 equivalentAxLOCK=2'b10 simply 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 AxLOCK width 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.

Bridging AXI3 locked to AXI4: no equivalent, so avoid/reject, convert to exclusive, or serialize locally.preferredif lock requiredAXI3 lockedtransaction(AxLOCK=10)No AXI4equivalent —bridge must…Avoid/reject orconvert toexclusiveOr serializelocally(re-cost)
Figure 4 — AXI3→AXI4 bridging of locked access. AXI3's 2-bit AxLOCK locked mode has no AXI4 equivalent (1-bit field), so a bridge must avoid/reject locked sequences, convert the intent to exclusive access, or enforce exclusion locally by serializing — each with trade-offs. Modern designs avoid locked access and use exclusive throughout.

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:

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.