Interview Question · Concept
AXI IDs and Response Order
- Asked at Qualcomm
The Question
The interviewer asks
What does the AXI ID guarantee about the order of responses? Can read data from two transactions be interleaved?
You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Responses with the same ID come back in request order. Different IDs carry no ordering, so they may complete in any order. Read data of different IDs may be interleaved beat by beat. The beats of one ID are never interleaved with each other. AXI4 write data has no ID and must follow the address order. AXI3 had WID and allowed write interleaving.
Each queue holds what the manager still expects on that ID. A beat with RID 1 can only be the head of queue 1.
- Cycle 1
ID 1 asks for four beats from 0x100. The manager queues the four values it expects on ID 1.
- Cycle 2
ID 2 asks for four beats from 0x200, one cycle later.
- Cycle 4
The first beat is 50 with RID 1: the head of queue 1, as it must be.
- Cycle 5
The next beat carries RID 2. The memory is interleaving the two transactions, which AXI4 allows between different IDs.
- Cycle 6
RID 1 again, with 51, the new head of queue 1. Within one ID the order never changes.
- Cycle 10
RLAST with RID 1: transaction 1 is complete and queue 1 is empty.
- Cycle 11
RLAST with RID 2 one cycle later. Nothing was mispaired, because every beat was matched against its own queue.
Interleaving mixes transactions; it never reorders the beats of one transaction. The ID on every beat makes that safe.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says same-ID responses come back in order. Responses with different IDs may come back in any order.
What Interviewers Listen For (Mid-Level)
A good mid-level answer adds that read beats of different IDs may interleave, and AXI4 writes may not. It says reads and writes are never ordered against each other.
What Interviewers Listen For (Senior)
A good senior answer treats choosing IDs as a performance decision: one ID for dependent traffic, different IDs for independent streams.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItCompareScale It
- AXI IDs and Response Order
-
WhyWhy Same-ID Responses Stay in OrderL1 Junior
Why does AXI force same-ID responses into order at all? Why not let everything reorder?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
A response carries only the ID. With two transactions open on one ID, the manager can pair each response with its request only by order. Ordering per ID also lets a simple manager use one ID and never build a reorder buffer. A capable manager uses several IDs as several in-order streams.
Self-Check
Tick each key point you covered in your answer.
-
What IfInterleaved Read DataL2 Mid-Level
Two 4-beat reads on IDs 1 and 2 come back as 1, 2, 1, 2, 2, 1, 2, 1. Legal? What must the monitor do?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Legal: different IDs may interleave beat by beat. Each transaction's beats must still stay in order and end with its own RLAST. The monitor must assemble beats per RID and file each beat under the oldest open read of that ID. It closes the transaction on RLAST. A monitor that assumes contiguous bursts glues beats of different reads together.
Self-Check
Tick each key point you covered in your answer.
-
What IfA Manager That Cannot Take InterleavingL2 Mid-LevelL3 Senior
A manager team says their block cannot handle interleaved read data. Is that allowed, and what does the spec offer?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Not if the manager issues different IDs: such a manager must accept interleaved data. The Read_Interleaving_Disabled property only lets it switch interleaving off as an optimisation. That works only when the attached subordinate supports it. So the test plan must cover interleaved returns for every manager that uses several IDs.
Self-Check
Tick each key point you covered in your answer.
Spec Misquote
"Interleaving is optional, so our manager need not handle it."
Every manager that issues different IDs must accept it. Disabling it is an optimisation that needs the subordinate to support it.
Source AMBA AXI Protocol Specification IHI 0022L §A5.6.1 Read data interleaving
-
Scale ItChoosing IDs for ThroughputL2 Mid-LevelL3 Senior
A manager uses one ID for everything. The latency of its short reads is terrible whenever a long read is in flight. Why, and what would you change?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Same-ID responses must return in order, so a short read queues behind a slow one (head-of-line blocking). Give independent streams their own IDs, so the subordinate or interconnect can answer the fast one first. Keep one ID only for accesses that must stay ordered. The cost is reorder storage in the manager and more tracking downstream. Lesson P2.10 measured a fast read waiting seven edges on a shared ID, and three on its own.
Two Reads with ID 5: The Fast Answer Waits for the Slow OneMeasured on the bench: the second read has its data two cycles after its request and may not send it. All cyclesBoth answers carry ID 5. Only their order tells the manager which is which.
- Cycle 1
The first read with ID 5 goes to the slow path, which needs six cycles. The manager notes: the first answer on ID 5 is this one.
- Cycle 2
The second read with ID 5 goes to the fast path.
- Cycle 4
The fast path has its data, 50, two cycles later. It may not send it: an older read with ID 5 is still open.
- Cycle 8
The slow answer, d0, leaves first and lands on the first request. The manager has no other way to pair them.
- Cycle 9
Now 50 leaves and lands on the second request. Five cycles of waiting bought the only guarantee the ID can give.
The read data channel carries the ID and nothing else that names a request. Same ID, same order: that is the whole rule.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer names head-of-line blocking, where a fast response waits behind a slow one, and gives the fix.
What Interviewers Listen For (Senior)
A good senior answer weighs the manager's reorder buffer and the interconnect's tracking for each ID against the latency gained.
- Cycle 1
-
CompareA Read Issued Before the Write ResponseL1 JuniorL2 Mid-Level
Asked if they assume reads and writes share the order
A manager writes a word, and right after its last W beat it reads the same address with the same ID. Is it guaranteed to see the new value?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
No. AXI never orders a read against a write, whatever the IDs, so the read may return the old value. The manager's tool is to wait for the write's B response before issuing the read. Lesson P2.12 measured exactly this, with a posted write and a six-cycle write latency. The read issued after the last data beat returned the old word.
Self-Check
Tick each key point you covered in your answer.
Misconception
"Same ID means same ordering stream, so the read waits for the write."
Same-ID ordering applies within reads and within writes. Read and write channels have no ordering guarantee between them.
Source AMBA AXI Protocol Specification IHI 0022L §A5.3 Request ordering
-
Scale ItOrdering a Flag After a BufferL2 Mid-LevelL3 Senior
A DMA writes a 4 KB buffer, then writes a "done" flag that the CPU polls. How do you make sure the CPU never sees the flag before the data?
2:30You have two and a half minutes. Speak or type, then press Get Feedback under your answer. No credits needed.
Speech-to-text runs in your browser. Chrome and Edge may send audio to their own speech service.
You can edit your answer before you send it. Feedback uses AI and checks your answer only against our written answer. No credits are used and your answer is not saved.
Reveal the Model Answer
Before writing the flag, wait for the B responses of every buffer write. Only a completion response makes an access observable. Same-ID writes stay in order only to the same location, so one ID does not order the buffer against the flag. A Bufferable B can come from a buffer partway along the path. It then guarantees observability only inside the write's Domain, so the CPU must sit in that Domain.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer says the manager must wait for every B response before it writes the flag.
What Interviewers Listen For (Senior)
A good senior answer adds the Bufferable case. An early response from a buffer on the way only guarantees visibility inside the Domain. It also says one ID does not order writes to different addresses.
-
Prove ItSolve P2.12.1: The Stale ReadSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
Prove ItSolve P2.10.1: The Same-ID Order CheckerSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
What People Get Wrong
Common wrong answers and why they fail.
Half-Truth
"AXI is out of order, so the manager must tag and reorder every response."
Only across different IDs. A manager that issues one ID gets everything in order and needs no reordering at all.
Source AMBA AXI Protocol Specification IHI 0022L §A5.1 Transaction identifiers; §A5.3 Request ordering
Spec Misquote
"Write data can be interleaved between IDs just like read data."
Not since AXI4: WID is gone, and write data follows the order of the write addresses.
Source AMBA AXI and ACE Protocol Specification IHI 0022H.c §A5.2.2 Write data ordering; AMBA AXI Protocol Specification IHI 0022L §A5.5 Write data and response ordering