Interview Question · Debug
The Link That Never Moved
The Question
The interviewer asks
A DMA engine and a memory controller each pass their unit tests. Connected, nothing moves: the wave shows valid and ready low forever while both have work. What happened and whose bug is it?
Illustrative clock samples
edge source_has_data sink_has_room valid ready
1 1 1 0 0
2 1 1 0 0
3 1 1 0 0You 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
It is a circular wait. The engine raises valid only after seeing ready, and the controller raises ready only after seeing valid. The controller is legal, because a sink may wait for valid. The engine broke the rule that valid must not wait for ready. Its unit test passed because that bench kept ready high in advance. The run shows the same source moving 18 beats with one legal sink and 0 with another.
Both blocks wait. Neither wire ever lights, so no beat ever moves.
- Cycle 0
The engine holds beat a1. It will raise
validas soon as it seesready. - Cycle 1
The controller has four free slots. It will raise
readyas soon as it seesvalid. - Cycle 4
Four edges later nothing has changed, and nothing ever will. A rule about who moves first is the only cure.
Each block waits for the other to move first, so neither ever moves. The source broke the rule.
bad source, waiting sink: 0 beats in 20 cycles bad source, ready-first sink: 18 beats in 20 cycles good source, waiting sink: 18 beats in 20 cyclesSelf-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Fresher)
A good fresher answer sees that each block waits for the other, so neither moves. It names the rule the source broke: valid must not wait for ready.
What Interviewers Listen For (Junior)
A good junior answer explains why the unit test passed: its sink raised ready before any data came. It fixes the source, not the legal sink.
What Interviewers Listen For (Senior)
A good senior answer asks for a check on every source by itself. The bench holds ready low and still demands valid, so the next such bug shows up before integration.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItBreak ItCompareScale It
- The Link That Never Moved
-
WhyWhy the Rule Is LopsidedL1 JuniorL2 Mid-Level
Why is the sink allowed to wait for
valid, but the source is not allowed to wait forready?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
Someone has to move first, and the source is the side that knows a beat exists. Letting the sink wait is useful. An interconnect can decode the address carried with
validbefore it decides which target grants it. A sink can also keepreadylow to save power. If either side could wait, two compliant blocks could deadlock, so the spec fixes the order.Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says one side has to move first, or two waiting blocks can stop each other.
What Interviewers Listen For (Mid-Level)
A good mid-level answer gives the reason the sink may wait. An interconnect can decode the address that comes with
validbefore it decides who grants it. -
CompareReady as a Function of ValidL2 Mid-LevelL3 Senior
If the sink may wait for
valid, may it computereadycombinationally fromvalidin the same cycle?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
Inside one block, a same-cycle
ready = f(valid)works logically. But on an AXI interface, the spec forbids combinational paths from inputs to outputs. So the wait goes through a register, andreadyrises the cycle aftervalidis seen. The rule stops timing paths from chaining across blocks. A combinational ready path would grow with every stage.Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer knows that AXI bans a combinational path from an input to an output on an interface.
What Interviewers Listen For (Senior)
A good senior answer links this rule to timing closure across a chain of stages. It also explains the trade-off of adding a register slice to break the path.
Spec Misquote
"Waiting for valid means ready can be
assign ready = valid && !full;at the port."That is an input-to-output combinational path at the interface, which AXI forbids. Register it, or decouple it with a slice.
Source AMBA AXI Protocol Specification IHI 0022L §A2.1.1 Clock
-
Prove ItSolve R4.4.1: A Skid BufferSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
Break ItTwo Blocks That Close a Combinational LoopL2 Mid-LevelL3 Senior
Break it: one block makes
validfromready, and its neighbour makesreadyfromvalid, both in the same cycle. What happens?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
The two paths close a combinational loop through both blocks. Simulation can oscillate or hang in zero time, and timing tools cut the loop at a random point. AXI rules both halves out. A transmitter must not wait for READY before it asserts VALID, and no input may reach an output combinationally.
Self-Check
Tick each key point you covered in your answer.
Missed Corner
"Each block is fine on its own, so the pair is fine."
The loop exists only when they connect. Check each interface rule at the block, or the loop appears at integration.
Source AMBA AXI Protocol Specification IHI 0022L §A2.1.1 Clock
-
What IfReady as a Function of ValidL2 Mid-LevelL3 Senior
If the sink may wait for
valid, may it computereadycombinationally fromvalidin the same cycle?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
Inside one block, a same-cycle
ready = f(valid)works logically. But on an AXI interface, the spec forbids combinational paths from inputs to outputs. So the wait goes through a register, andreadyrises the cycle aftervalidis seen. The rule stops timing paths from chaining across blocks. A combinational ready path would grow with every stage.Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer knows that AXI bans a combinational path from an input to an output on an interface.
What Interviewers Listen For (Senior)
A good senior answer links this rule to timing closure across a chain of stages. It also explains the trade-off of adding a register slice to break the path.
Spec Misquote
"Waiting for valid means ready can be
assign ready = valid && !full;at the port."That is an input-to-output combinational path at the interface, which AXI forbids. Register it, or decouple it with a slice.
Source AMBA AXI Protocol Specification IHI 0022L §A2.1.1 Clock
-
Prove ItSolve R4.4.1: A Skid BufferSimulator-graded
Show it, don't just say it: this Silicon Lab problem is graded by the simulator.
-
Break ItTwo Blocks That Close a Combinational LoopL2 Mid-LevelL3 Senior
Break it: one block makes
validfromready, and its neighbour makesreadyfromvalid, both in the same cycle. What happens?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
The two paths close a combinational loop through both blocks. Simulation can oscillate or hang in zero time, and timing tools cut the loop at a random point. AXI rules both halves out. A transmitter must not wait for READY before it asserts VALID, and no input may reach an output combinationally.
Self-Check
Tick each key point you covered in your answer.
Missed Corner
"Each block is fine on its own, so the pair is fine."
The loop exists only when they connect. Check each interface rule at the block, or the loop appears at integration.
Source AMBA AXI Protocol Specification IHI 0022L §A2.1.1 Clock
-
Scale ItCatching Circular Waits Before IntegrationL3 Senior
How would your methodology have caught that deadlock at block level, before the two blocks met?
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
Test each source against an adversarial sink, one that keeps
readylow until it seesvalid. Assert that pending work producesvalidwithin a bound whilereadystays low. In every agent, randomisereadyper cycle, including long low stretches. In formal, assumereadystays low untilvalidand prove thatvalidrises. A cover that never hits points at the circular wait.Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Senior)
A good senior answer puts a hostile sink, one that keeps
readylow until it seesvalid, into the reusable agent. It adds a property thatvalidcomes within a bound, not just a global timeout. -
Prove ItSolve P1.3.2: Catch the Broken SourcesSimulator-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
"Fix the controller so it raises ready first."
That hides the bug for this pairing only. The run shows the same source deadlocking with any legal sink that waits for valid. One example is an interconnect that decodes the address first.
Wrong Altitude
"Add a watchdog that pulses ready when the link is idle too long."
A watchdog turns a protocol violation into a performance bug that comes and goes. The rule exists so that no timer is needed.
Misconception
"Both blocks are at fault; they need to agree who goes first."
The spec already decides: the receiver may wait, and the transmitter may not. Only the source breaks the spec.
Source AMBA AXI Protocol Specification IHI 0022L §A2.3 Valid-Ready transport