← Design Verification Interviews

Interview Question · Debug

Triaging a Scoreboard Mismatch

L1 JuniorL2 Mid-Leveluvmdebugscoreboard

The Question

The interviewer asks

A smoke test sends 16, 32, 48, 64 and 80 to an incrementer and fails with this log. Where do you look first, and what is the likely cause?

log
UVM_INFO @ 0: reporter [RNTST] Running test smoke_test...
 35 ns  scoreboard y=17 checked
UVM_ERROR main.sv(164) @ 95: uvm_test_top.sb [SB] y=49, expected 33
UVM_ERROR main.sv(164) @ 125: uvm_test_top.sb [SB] y=65, expected 49
UVM_ERROR main.sv(164) @ 155: uvm_test_top.sb [SB] y=81, expected 65
UVM_ERROR main.sv(169) @ 235: uvm_test_top.sb [SB] 1 expected results never arrived
--- UVM Report Summary ---
UVM_ERROR :    4
Reveal the Model Answer

Start at the first error, not the last. Each "wrong" value is the result for the next input: 49 arrives where 33 was expected, then 65 where 49 was expected. That pattern is a shift, so one result went missing; the arithmetic is fine. The end check agrees: one result never arrived. Look at the output pins around the time 33 was due, then decide whether the DUT dropped it or the monitor missed it.

Each result meets the prediction before its own
01234check at (ns)3595125155235queue front1733496581result seen17496581noneverdictmatchmismatchmissingfirst error: 49 is the result for input 48end check: 81 is still waiting

Result 33 never arrived. Every later result is compared with the prediction one place ahead of it, and one prediction is left at the end.

InputExpectedGotReading
161717match
3233(none)the lost result
484949compared against 33
646565compared against 49
808181compared against 65

Line the results up by input and the shift is obvious.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Listen For (Junior)

A good junior answer reads the first error first. It notices that each actual value equals the next expected value, and says a result went missing.

Cross-Questions

Where the interviewer goes next. Open a node to practise that follow-up.

WhyWhat IfProve ItCompareScale It

  1. Triaging a Scoreboard Mismatch
  2. CompareDropped by the DUT or Missed by the MonitorL2 Mid-Level

    Compare the evidence for "the DUT dropped the result" with "the output monitor missed it".

    Reveal the Model Answer

    If the pins never show out_valid for 33, the DUT dropped it. If the pins show it but the monitor did not publish it, the monitor's sampling condition is wrong. A transaction count per interface settles it quickly. So does an independent check on the pins, such as an assertion or a short $display.

    Self-Check

    Tick each key point you covered in your answer.

    Half-Truth

    "The monitor is simple, so it cannot be the problem."

    Monitors sample on the wrong edge or condition often, and a monitor bug hides DUT bugs too. Check it with the same care.

  3. What IfWhen the Waveform Clears the DUTL2 Mid-Level

    Asked if they blame the DUT at once

    What if the waveform shows the DUT driving 33 correctly at the right time?

    Reveal the Model Answer

    Then the bench lost it. Check the output monitor's sampling edge and condition, then the analysis connection, then the scoreboard's queue handling. Fix it and add a check that would have caught it, such as equal input and output counts. A bench bug that hides one result can hide real bugs too.

    Self-Check

    Tick each key point you covered in your answer.

  4. Scale ItTriage When Many Tests FailL3 Senior

    Scale it: 200 tests fail overnight with scoreboard errors. How do you triage?

    Reveal the Model Answer

    Group the failures by the text of their first error and by the commits since the last good run. One root cause usually gives one group. Rerun one failure per group with its seed and with waves on. Assign groups to people, not single tests, so two people never debug the same bug.

    Self-Check

    Tick each key point you covered in your answer.

    What Interviewers Listen For (Senior)

    A good senior answer groups failures by their first error message and by the commits since the last good run. It reruns one seed per group and tracks each group until it is fixed.

  5. WhyError Messages That Group WellL3 Senior

    Why should error messages be written so that they group well?

    Reveal the Model Answer

    Automatic grouping works on the message text. A message with a fixed ID and a stable start, followed by the values, groups cleanly. A message that starts with a time or a counter makes every failure look unique. Use the report ID for the name of the check.

    Self-Check

    Tick each key point you covered in your answer.

  6. Prove ItSolve U7.2.1: A Scoreboard Among Careless ListenersSimulator-graded

    Show it, don't just say it: this Silicon Lab problem is graded by the simulator.

    Open Problem U7.2.1

What People Get Wrong

Common wrong answers and why they fail.

Delivery

Opens the waveform at the last error and works backwards from the end.

Later errors are side effects of the first. Every comparison after a lost result is shifted, so the last error says little about the cause.

Misconception

"The DUT computes 33 wrong; it outputs 49."

49 is exactly the result for the next input, 48. Wrong arithmetic would give a value unrelated to the stream. The log shows a shift, which means a missing or extra item.

Source Measured: the log on this question, from the incrementer bench with the result 33 dropped, uvm-core 2020.3.1 on Verilator 5.052

Half-Truth

"The scoreboard is the reference, so the DUT must be wrong."

The scoreboard, its model and the monitors can be wrong too. Check that the input monitor saw five transfers before you blame the design.

Learn It, Then Prove It