AMBA AXI · Module 18
AXI Performance Interview Questions
Reason quantitatively about AXI performance in interviews — bandwidth (width x frequency x efficiency), latency vs. throughput, Little's Law for outstanding depth, where throughput is lost (short bursts, insufficient outstanding, backpressure, narrow transfers), and the structured way to diagnose 'why is this slow?'.
Performance questions test whether you can reason quantitatively about AXI throughput and latency — "what's the peak bandwidth?", "why is this only hitting half?", "how deep should outstanding be?". Unlike conceptual questions, these reward numbers and formulas: bandwidth as width × frequency × efficiency, Little's Law relating outstanding depth to bandwidth and latency, and a clear separation of latency (time for one transaction) from throughput (transactions per unit time). The strongest answers compute, identify the bottleneck, and reason about the fix. This chapter gives the formulas, the latency-vs-throughput distinction, the common throughput losses, and the structured way to answer "why is this slow?".
1. Bandwidth: Width × Frequency × Efficiency
The foundational performance formula: peak bandwidth = data width × clock frequency, and actual bandwidth = peak × efficiency, where efficiency is the fraction of cycles that actually carry a useful beat. For a 128-bit (16-byte) bus at 1 GHz, peak is 16 GB/s; if only 80% of cycles carry data (due to stalls, address overhead, short bursts), actual is ~12.8 GB/s. The interview move is to compute peak first, then reason about what drops efficiency below 100%. Knowing this decomposition — and that real systems live in the efficiency term — is the foundation of every performance answer.
2. Latency vs. Throughput: The Distinction They Probe
The most-probed performance distinction: latency is the time for one transaction (issue to completion); throughput is how many transactions complete per unit time. They're different and often confused: a high-latency system can still have high throughput if enough transactions are in flight to hide the latency. The key insight: AXI hides latency with outstanding transactions — while one transaction's latency is being paid, others are issued and completing, so throughput approaches bandwidth even when per-transaction latency is high. Stating that latency and throughput are decoupled (and how AXI decouples them — outstanding transactions) is the strong answer.
Outstanding transactions hide latency
11 cycles3. Little's Law: Sizing Outstanding for Throughput
The quantitative heart of AXI performance: Little's Law — the number of transactions in flight equals throughput × latency. Rearranged for design: to sustain a target throughput across a given latency, you need outstanding depth ≈ bandwidth × latency (the bandwidth-delay product). For example, to keep a bus fully utilized across a 100 ns round-trip at a transaction every cycle, you need ~100 transactions in flight. The interview application: if asked "why isn't this saturating the bus?", a top candidate checks whether the outstanding depth covers the latency — if depth < bandwidth × latency, the master starves and throughput is latency-limited, not bandwidth-limited.
4. Where Throughput Is Lost, and "Why Is This Slow?"
The common throughput losses — what drops efficiency below 100% — are a fixed checklist: short bursts (address-phase overhead per burst amortized over too few beats), insufficient outstanding (latency-limited starvation, the Little's Law gap), backpressure (a slow consumer stalling the data path), and narrow/unaligned transfers (not using the full bus width per beat). The structured answer to "why is this slow?": compute peak bandwidth, measure actual, find the efficiency gap, then check the list — bursts long enough? outstanding deep enough? backpressure present? full width used? — and identify the dominant bottleneck before proposing a fix. Diagnose, then fix; don't guess.
5. Common Misconceptions
6. Debugging Insight
7. Verification Insight
8. Interview Questions
9. Summary
Performance questions reward quantitative reasoning: compute first, then diagnose. Bandwidth = data width × clock frequency × efficiency — compute peak (the ceiling) first, then reason about efficiency (the useful-beat fraction), where real systems lose throughput. Latency (time for one transaction) and throughput (transactions per unit time) are decoupled: AXI hides latency with outstanding transactions, so a high-latency system still saturates the bus if enough transactions are in flight — conflating the two is the most common performance error. Little's Law (in-flight = throughput × latency) is the quantitative heart: outstanding depth ≈ bandwidth × latency (the bandwidth-delay product) both sizes outstanding for a target and diagnoses latency-limited starvation (depth < BW × latency → the master stalls, throughput is latency-limited not bandwidth-limited).
Throughput is lost to a fixed checklist — short bursts (address overhead), insufficient outstanding (Little's Law gap), backpressure (slow consumer), narrow/unaligned transfers (underused width) — and "why is this slow?" is answered by the method: compute peak → measure actual → find the efficiency gap → check the list → identify the dominant bottleneck → fix that one. The failure mode is the qualitative guess ("add bandwidth"), which usually misdiagnoses, since the bottleneck is more often latency- or efficiency-limited than bandwidth-limited. The connection to the job is direct: real performance tuning is this exact measure-compute-diagnose-fix loop, so reasoning quantitatively in the interview demonstrates the architectural judgment the job requires. The through-line of Module 18 holds — articulate the reasoning (here, quantitative) crisply. Next, the final interview chapter tackles the tricky misconceptions candidates repeat — the confidently-stated myths that end interviews.
10. What Comes Next
You can now reason quantitatively about performance; the final interview chapter clears the myths:
- 18.8 — Tricky Misconceptions (coming next) — the myths candidates confidently repeat (like "
VALIDwaits forREADY") and the correct understanding, so you never end an interview on a wrong-but-confident answer.
Previous: 18.6 — Verification Interview Questions. Related: 13.1 — Bandwidth & Throughput, 13.2 — Latency Analysis, and 13.3 — Outstanding Depth Tuning for the Little's Law sizing.