AMBA AXI · Module 19
CPU-to-Memory Path
Trace a CPU load and store end-to-end through AXI to memory — the path from core through cache, interconnect, and memory controller, how a load becomes an AXI read burst (cache-line WRAP) and a store a write, and how outstanding transactions and cache behavior shape the real performance of the most common AXI path in any SoC.
Module 19 applies the whole curriculum to real systems, starting with the most common AXI path in any SoC: a CPU accessing memory. When a core executes a load or store, that single instruction becomes a journey through cache, interconnect, and a memory controller — and AXI is the protocol carrying it across each hop. Tracing this path concretely shows why AXI's features exist: a load miss becomes a cache-line read burst (a WRAP for critical-word-first), a store becomes a write, the interconnect routes between core and memory, outstanding transactions hide DRAM latency, and cache behavior determines whether AXI is even involved. This chapter traces a load and a store end-to-end, connecting every AXI mechanism you've learned to its role in the path every program exercises billions of times.
1. The Path: Core → Cache → Interconnect → Memory Controller
A CPU doesn't talk to memory directly — it goes through layers, and AXI connects them. The core issues loads/stores to its cache; on a miss, the cache becomes an AXI manager, issuing read/write transactions to the interconnect, which routes them (by address decode) to the memory controller (an AXI subordinate) that drives the actual DRAM. Each hop is an AXI interface, so the same transaction may cross several AXI links (core-side cache port, interconnect ports, memory-controller port), often with width and clock changes along the way.
2. A Load Miss Becomes a Cache-Line Read Burst
Trace a load that misses the cache. The core requests one word, but the cache fetches an entire cache line (e.g. 64 bytes) — so the cache issues an AXI read burst sized to the line. It's typically a WRAP burst for critical-word-first: the requested word returns first (so the core can proceed), then the burst wraps to fill the rest of the line. The read goes out as AR (address, ARLEN for the line size, ARBURST=WRAP), and the data returns as R beats with RLAST on the final beat. This is exactly why WRAP bursts exist — the CPU load path is their canonical use.
3. A Store: Write-Back vs. Write-Through, and the Write Path
A store is more nuanced because of cache policy. In a write-back cache (the common case), the store updates the cache line and marks it dirty — no AXI traffic yet; the AXI write happens later when the dirty line is evicted (written back as a burst to memory). In a write-through cache, every store immediately issues an AXI write. Either way, the eventual write is an AXI write transaction: AW (address, length), W beats (data + WSTRB — partial for a sub-line write, full for a line write-back), and one B response. So a store may produce no AXI traffic (write-back hit), a deferred burst (eviction), or an immediate write (write-through) — cache policy decides.
4. Why Performance Depends on Outstanding and Cache Behavior
The real performance of the CPU-memory path is shaped by two things you've studied. Outstanding transactions: DRAM latency is high (tens to hundreds of cycles), so a core that issued one miss at a time and waited would stall constantly; instead, modern cores issue multiple outstanding misses (and prefetches), hiding DRAM latency behind concurrent accesses — Little's Law in action (depth ≈ bandwidth × DRAM latency). Cache behavior: most accesses hit the cache and never touch AXI at all, so AXI traffic is the miss traffic — meaning the AXI path's performance matters most under cache-miss-heavy workloads, and the cache is the first-order determinant of how much AXI traffic exists. Together, outstanding depth and hit rate determine whether the memory system keeps the core fed.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
The CPU-to-memory path — the most common AXI path in any SoC — runs core → cache → interconnect → memory controller → DRAM, with AXI connecting the hops (cache port, interconnect ports, memory-controller port), often across width and clock changes. Crucially, AXI carries only miss and write-back traffic, not every access: most loads/stores hit the cache and never touch AXI, so the cache hit rate is the first-order determinant of AXI activity. A load miss becomes a cache-line read burst — typically a WRAP for critical-word-first (the requested word returns first so the core unblocks, then the burst fills the line) — which is the canonical reason WRAP bursts exist. A store depends on cache policy: write-back marks the line dirty with no AXI traffic now, writing back as a burst on eviction; write-through writes immediately — so cache policy decides when (and whether) a store hits AXI.
Performance is shaped by two studied mechanisms: outstanding transactions hide high DRAM latency (Little's Law, depth ≈ bandwidth × DRAM latency — a single-miss-at-a-time core would stall, a multi-outstanding core stays fed), and cache behavior (hit rate + write policy) determines how much AXI traffic exists and when. The path exercises nearly every AXI mechanism — bursts/WRAP, outstanding, the interconnect (decode/route/ID-remap/arbitration), CDC and width conversion, WSTRB, both channel directions — in its most natural role, which is why it's the ideal first case study: it grounds the abstract mechanisms of Modules 1–18 in the concrete path every program runs, and teaches the system-level lessons (AXI = miss traffic, cache policy shapes writes, latency-hiding is the whole game) that block-level study misses. Understanding this path is understanding why AXI is designed as it is. Next, we trace a DMA engine streaming bursts into a DDR controller.
10. What Comes Next
You've traced the CPU-memory path; next, a different real traffic pattern:
- 19.2 — DMA-to-DDR Transfers (coming next) — tracing a DMA engine's burst stream landing in a DDR controller, a throughput-oriented path that contrasts with the latency-sensitive CPU path.
Previous: 18.8 — Tricky Misconceptions. Related: 7.4 — WRAP Bursts for the cache-line fetch, 8.1 — Why Outstanding Transactions for DRAM latency hiding, and 12.1 — AXI Interconnect Overview for the routing between core and memory.