Blog / A regression test fails: how to answer the debug question

A regression test fails: how to answer the debug question

Design Verification · InterviewPS team · 30 October 2026
In short
Answer in five steps: reproduce the failure with the same test, seed and configuration; localize it to the first cycle where behaviour went wrong, not the cycle where the checker complained; classify it as an RTL bug, a testbench bug, a bad constraint or a spec ambiguity; get it fixed by whoever owns it; and add a check or coverage point so the same bug cannot slip back in.

What the interviewer is listening for

"A test failed in last night's regression. What do you do?" sounds open, but most interviewers have a checklist in mind. They want to hear that you reproduce before you guess, that you look for the first point of failure, and that you consider the testbench as a suspect, not only the design.

Step 1: reproduce

Re-run the same test with the same seed, the same configuration and the same build. In SystemVerilog, random stability means a given seed produces the same stimulus as long as the code that draws random numbers has not changed, so a seed is enough to reproduce most failures. If it does not reproduce, that is a finding in itself: something outside the seed changed, such as the build, a plusarg or the simulator version.

Step 2: localize to the first bad cycle

The error message tells you where the checker noticed a problem, which is often many cycles after the cause. A scoreboard mismatch on a packet may come from a corrupted write hundreds of cycles earlier. Work backwards from the error through the waveform until you find the first cycle where a signal did something the spec does not allow. Assertions close to the design shorten this search, because they fire at the point of failure rather than at the output.

Step 3: classify

  • •
    RTL bug: the design did something the spec forbids.
  • •
    Testbench bug: the reference model, scoreboard or driver is wrong, and the design was right.
  • •
    Bad constraint: the stimulus was illegal, so the design was never required to handle it.
  • •
    Spec ambiguity: the design and the testbench read the spec differently, and neither is clearly wrong.
Interviewers notice when a candidate assumes every failure is an RTL bug. In practice a large share of failures in a young testbench are testbench bugs, and saying so shows experience.

Step 4 and 5: fix, then prevent

Send the failure to whoever owns the faulty part, with the seed, the command line and the first bad cycle, so they can reproduce it in minutes. A spec ambiguity goes to the architect, not to either side.
Then make sure it cannot come back unnoticed: add an assertion at the point of failure, a coverage point for the scenario that exposed it, and keep the failing seed in the regression. That last step is what turns one debug session into lasting protection.

Mistakes that cost candidates the question

  • •
    Starting from the waveform at the error time instead of reproducing first.
  • •
    Treating the scoreboard's error cycle as the cause.
  • •
    Assuming the design is always the one at fault.
  • •
    Fixing the bug and stopping there, with no new check to catch it next time.

Sources

  • IEEE Std 1800-2017, SystemVerilog, §18.14 "Random stability"
  • IEEE Std 1800.2-2020, Universal Verification Methodology Language Reference Manual