Interview Question · Design
Functional Coverage for a Bus
- Likely at Microchip
- Likely at Micron
- Likely at Cadence
The Question
The interviewer asks
What functional coverage would you write for a bus interface like AXI, and what traps do you watch for?
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
Sample from the passive monitor when a transaction completes, not from the driver when it is issued. Cover the attributes: burst, length, size, alignment, and distance to a 4 KB or wrap boundary. Cover concurrency: outstanding depth, ID reuse and interleaving. Add backpressure (stall length per channel, including the last beat), every response type, and reset mid-transaction. Cross only the fields that interact. A cross of every field gives thousands of bins that nobody closes.
- Intent
When the driver sends an item, the stall length and the response are still unknown.
- Result
The monitor rebuilds the transaction at completion, with its response and stall pattern. The covergroup samples here.
Read the diagram as text
- Sequence: Creates the intended item
- Driver: Knows the intent, not the result
- Design: Accepts, stalls, responds
- Passive monitor: Sees the accepted transaction
- Covergroup: Samples at completion
- Sequence → Driver: item
- Driver → Design: drives wires
- Design → Passive monitor: wires
- Passive monitor → Covergroup: completed transaction
Sample where the result is known. The same monitor and covergroup also work when the agent only watches.
| Group | Coverpoints | Cross with |
|---|---|---|
| Attributes | AxBURST, AxLEN (bucketed), AxSIZE, start alignment | burst x length x size, legal combinations only |
| Boundaries | bytes to the next 4 KB edge, start offset in the wrap window | burst type |
| Concurrency | outstanding count, same ID in flight, read interleaving | ID width use |
| Backpressure | stall length on each of AW, W, B, AR, R; stall on LAST | channel |
| Responses | OKAY, EXOKAY, SLVERR, DECERR, error mid-burst | read or write |
| Reset | reset during address, data or response | channel |
A starting model. Each row should trace back to a line in the test plan.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer samples at the monitor and names the attribute and backpressure groups. It crosses only combinations that are legal.
What Interviewers Listen For (Senior)
A good senior answer covers boundaries and concurrency, and sizes each cross with arithmetic before writing it. It ties every bin to an item in the plan.
Cross-Questions
Where the interviewer goes next. Open a node to practise that follow-up.
WhyWhat IfProve ItBreak ItCompareScale It
- Functional Coverage for a Bus
-
WhyWhere Coverage Is SampledL2 Mid-Level
Why sample coverage in the monitor at completion rather than in the sequence or the driver?
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
Coverage should record what the design actually did. The monitor sees only accepted transactions, with their real response and timing. It also works the same when the agent is passive (only watching) in a larger environment. Sampling at completion lets a bin record the response and the stall pattern. The driver cannot know these when it sends the item.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer gives two reasons. The monitor sees what was really accepted, not what was intended, and it still works when the agent is passive.
-
What IfCoverage Sampled in the DriverL2 Mid-Level
What if coverage is sampled in the driver instead? Show a bin it fills falsely.
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
Say a write is driven, but reset aborts it before the handshake. The driver has already counted a write of that kind. The bin closes, yet the design never completed it. Driver coverage measures what the stimulus asked for, not what the design did.
Self-Check
Tick each key point you covered in your answer.
Half-Truth
"Driver coverage equals monitor coverage when there are no errors."
Reset, a dropped item or a stalled channel can stop a driven item from completing. The driver cannot see that.
Source Lesson U15.1 key points
-
CompareCode Coverage Versus Functional Coverage on a BusL1 JuniorL2 Mid-Level
For a bus subordinate, what does code coverage tell you that functional coverage does not, and the other way round?
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
Code coverage finds RTL that no test reached, such as an error path or an unused state. Nobody has to think of these in advance. Functional coverage checks that the scenarios the spec and plan care about happened. That includes combinations and sequences that no single line of code represents. Code coverage cannot see a missing feature and functional coverage cannot see dead code, so you need both.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Junior)
A good junior answer says code coverage is automatic and follows the RTL structure. Functional coverage is written by hand from the spec.
What Interviewers Listen For (Mid-Level)
A good mid-level answer gives a bus example of each blind spot. Code coverage misses a missing feature, and functional coverage misses dead code.
-
Scale ItSizing a Cross Before Writing ItL3 Senior
How many bins does a burst x length x size cross have on a 32-bit AXI interface? How would you cut it down?
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
Start from the legal set, not the raw one. On a 32-bit bus Size is 1, 2 or 4 bytes, and INCR allows 256 lengths, FIXED 16 and WRAP 4. That gives 3 x (256 + 16 + 4) = 828 legal combinations, against 6,144 raw. Then bucket the lengths where behaviour does not change: 1, 2 to 15, 16, 17 to 255, and 256. That leaves a few dozen bins, and each one means something.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Senior)
A good senior answer counts the legal combinations first. It places each length bucket where the design's behaviour really changes.
-
Break ItThe Backpressure Nobody CoveredL2 Mid-LevelL3 Senior
All coverage is green, yet a customer hits a hang when the response channel is stalled. How did that escape?
log Illustrative regression/customer comparison Regression: response traffic covered, all reported coverage goals met Customer: RVALID=1, RREADY=0 for an extended interval RREADY returns to 1; transfer never completes2: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
Most likely the bench kept
BREADYandRREADYhigh, so the subordinate's response-side stall path never ran. Every stall rule then passed vacuously, because no stall ever happened. The coverage model also had no stall-length bins on B or R. Randomisereadywith long low runs on every channel the testbench drives, and cover stall length per channel. Also count how often each checker antecedent matched.Three Beats, Zero Stalls, Five Vacuous PassesThe hold property on a sink that is always ready. attempt startsvacuous success: the antecedent did not matchAll edges- Edge 2 · t=15
Beat one is taken at 15 with
readyalready high.valid && !readyis false, so the attempt ends as it starts. - Edge 5 · t=45
Five edges, five open circles. The hold rule was never exercised, and the report says pass.
Read the lanes as text
- edge @5, from edge 1 (t=5): succeeds vacuously at edge 1 (t=5).
- edge @15, from edge 2 (t=15): succeeds vacuously at edge 2 (t=15).
- edge @25, from edge 3 (t=25): succeeds vacuously at edge 3 (t=25).
- edge @35, from edge 4 (t=35): succeeds vacuously at edge 4 (t=35).
- edge @45, from edge 5 (t=45): succeeds vacuously at edge 5 (t=45).
Sampled values, edge 1 to 6: valid 0 1 1 1 0 0; ready 1 1 1 1 1 1.
The program behind the lanes
The lanes come from running this program on Verilator 5.052. Each lane is a separate copy of
hold_validthat can start only at that lane's edge, so every verdict and its edge are read from that copy's own output.module tb; logic clk = 0; always #5 clk = ~clk; // rising edges at 5, 15, 25, ... logic valid = 0, ready = 1; // the sink is ready at every edge hold_valid: assert property (@(posedge clk) valid && !ready |=> valid); initial begin @(negedge clk); valid = 1; // three beats, taken at 15, 25 and 35 @(negedge clk); @(negedge clk); @(negedge clk); valid = 0; @(negedge clk); @(negedge clk); $finish; end endmoduleA sink that is always ready never stalls the link. The hold rule passes five times without ever being tested.
Self-Check
Tick each key point you covered in your answer.
What Interviewers Listen For (Mid-Level)
A good mid-level answer points at
readyheld high on the response channels, so no stall ever happened.What Interviewers Listen For (Senior)
A good senior answer makes two things standard plan items for every agent. They are stall-length bins per channel and a count of each checker's starts.
- Edge 2 · t=15
-
Prove ItSolve P2.17.1: The AXI MonitorSimulator-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
"Sample in the driver when the sequence item is sent."
That covers what the test intended. A transaction the DUT never accepted, or one cut short by reset, still counts.
Wrong Altitude
"Cross every field with every other field."
AxLEN, AxSIZE and AxBURST alone give 6,144 raw combinations, and most are illegal on a given bus. Restrict and bucket the crosses, or they never close.
Half-Truth
"100% code coverage on the subordinate means the protocol is covered."
Code coverage says the lines ran. It does not say a stall hit the last beat while two IDs were outstanding. Interactions need functional coverage.