Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Start Here6
  • SystemVerilog Language Foundations28
  • Object-Oriented SystemVerilog for Verification30
  • Constraint Randomization — Interview-Critical Deep Dive36
  • SystemVerilog Assertions — Interview-Critical Deep Dive40
  • Functional Coverage in SystemVerilog22
  • Testbench Architecture in SystemVerilog23
    • Testbench Anatomy & Layering
    • Stimulus: Generators, Transactions & Drivers
    • Monitors, Scoreboards & Reference Models
    • Self-Checking Tests & Regression
      • Self-Checking Discipline
      • Seeds & Reproducibility
      • Logging & Verbosity Strategy
      • The Regression Flow
    • From Hand-Built TB to UVM
  • Advanced Language & Integration25
  • Senior & Interview Preparation21
  • Principal-Level Verification28
Loading lesson

‹Self-Checking Tests & Regression
  1. Topics
  2. SystemVerilog
  3. Testbench Architecture in SystemVerilog
  4. Self-Checking Tests & Regression
  5. The Regression Flow

Part 6 · Testbench Architecture · Intermediate

The Regression Flow

Dispatch a test-by-seed matrix in parallel, bucket failures, and rerun to green.

On this page

    Test list times seeds

    A regression is a matrix: a test list of which tests run with which knobs, crossed with seeds that select one random stream per run. The dispatcher expands the matrix into jobs, farms them out in parallel, then scrapes each log for its banner and exit code.

    Everything earlier in this topic exists so this flow runs without humans: banners, seeds in headers, knobs, and grep-able logs.

    Diagram
    test list                seeds
    ---------                -----
    smoke_test     x1        random per run,
    burst_test     x20       recorded in log
    err_inject     x10
    soak_test      x5
          |
          v
    DISPATCH: N jobs in parallel
      job = (test, seed, knobs) -> sim -> run.log
          |
          v
    AGGREGATE per job:
      PASS banner + exit 0     -> pass
      FAIL banner / exit != 0  -> fail + first-problem signature
      no banner / timeout      -> infra trouble (counts as fail)
          |
          v
    TRIAGE: bucket fails by first-problem signature
    RERUN failures with logged seeds -> reproduce -> debug -> fix
          repeat until green

    Job count

    When

    Purpose

    1 seed per smoke test

    Every run

    Fast signal that the basics work.

    10 to 20 seeds per random test

    Nightly

    Breadth across the stimulus space.

    Soak tests with long counts

    Weekly or milestone

    Rare sequences and coverage closure.

    Aggregate and bucket

    Thirty failing runs rarely mean thirty bugs. The aggregator takes each run's first-problem line, masks volatile fields such as time, addresses and ids, and clusters identical signatures into buckets. A run passes only with a PASS banner and exit status 0, which the dispatcher saved next to the log.

    Each bucket is one suspected bug. Engineers debug one representative run per bucket, not all thirty.

    Diagram
    # Aggregate: one verdict line per run. The dispatcher wrote each
    # run's exit status to exit_code next to its run.log.
    for dir in results/*; do
      log="$dir/run.log"
      if grep -q "^PASS:" "$log" && [ "$(cat "$dir/exit_code")" = "0" ]; then
        echo "PASS  $log"
      else
        # first-problem signature; time, numbers and ids masked for clustering
        sig=$(grep -m1 -E "LOG_ERROR|^FAIL:" "$log" |
              sed 's/^\[[0-9]*\]/[T]/; s/0x[0-9a-fA-F]*/0xN/g; s/#[0-9]*/#N/g')
        if [ -z "$sig" ]; then sig="NO_BANNER_OR_CRASH"; fi
        echo "FAIL  $log  $sig"
      fi
    done | tee summary.txt
    
    # Triage buckets: cluster failures by signature
    grep "^FAIL" summary.txt | cut -d' ' -f4- | sort | uniq -c | sort -rn

    The masking turns thirty runs with different addresses into one bucket line. The representative seed for each bucket sits in its log header, ready for replay.

    Tiers and the rerun loop

    Not every change deserves the full matrix. Healthy projects layer regressions like a pyramid: tiny and fast at the commit gate, broad and slow at night, exhaustive before milestones.

    Tier

    Content

    Budget

    Per-commit gate

    Smoke list, 1 to 2 seeds

    Minutes; blocks the merge on failure.

    Nightly

    All tests, many seeds

    Hours on the farm; triage board each morning.

    Weekly or milestone

    Full matrix, soak tests, coverage merge

    Slow by permission; closure report.

    The wide base runs constantly, so it must be fast and rock-stable. A flaky gate trains people to bypass it, which is worse than no gate at all.

    Coverage merge belongs to the nightly and milestone tiers. Single-run coverage means little; merged sweeps show closure.

    1. Aggregate the overnight run and cluster failures into signature buckets.

    2. Pick one representative test and seed per bucket from the log headers.

    3. Replay it with verbosity up and waves on, then debug and fix the RTL or the testbench.

    4. Rerun just the failing pairs to confirm each fix.

    5. Rerun the full matrix, since fixes can unmask new failures downstream.

    Common mistakes

    Common pitfall

    Treating each failing run as its own bug burns days on one defect, and rerunning failures with fresh seeds proves nothing. Bucket by signature, then replay the exact logged seed.

    Interview

    Likely questions: “Walk me through your regression flow”, “Thirty failures overnight, where do you start?”, and “What runs per commit versus nightly?”. Each answer follows matrix, buckets, seeded rerun, and tiers.

    Check yourself A timed-out run has no banner and no problem line. Pass, fail, or neither?

    Fail as infrastructure trouble. Neither-pass-nor-fail runs vanish from reports and hide real breakage.

    Check yourself The full matrix is green after a fix for one bucket. Why rerun the matrix instead of stopping at the fixed pair?

    A fix can unmask failures that the old defect hid downstream. Only the full matrix shows the design is truly green.

    Previous

    182 / 259

    Next: From Hand-Built TB to UVM

    Up next

    Up nextFrom Hand-Built TB to UVM

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Self-Checking Discipline
    • Seeds & Reproducibility