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

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
    • Testbench Debug Puzzles: Why Did the Test Hang?
    • Deadlock Scenario Puzzles: Objection and Phase Stalls
    • Scoreboard Puzzles: Mismatch or Ordering Bug?
      • Out-of-Order Responses Miscompared as Corruption
      • Missing First Transaction After Reset
      • Duplicate Transactions from Handle Reuse
      • Mismatch Cascade from Incorrect Pop Policy
      • End-of-Test Draining Missing
      • Duplicate Expected Entries from Predictor Retry Path
    • Real Interview Rounds: End-to-End Debug Walkthrough
    • Scenario & Debug Puzzles: Tricky Q&A
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Scoreboard Puzzles: Mismatch or Ordering Bug?
  1. Topics
  2. DV Interview Puzzles
  3. Scenario & Debug Puzzles
  4. Scoreboard Puzzles: Mismatch or Ordering Bug?
  5. Mismatch Cascade from Incorrect Pop Policy

VLSI DV Interview Puzzles · All levels

Mismatch Cascade from Incorrect Pop Policy

After first mismatch, every subsequent compare fails with shifted values. Identify the scoreboard policy error.

On this page

    Puzzle

    Difficulty: Hard · Puzzle 4 of 6 · Topic: Scoreboard Puzzles: Mismatch or Ordering Bug?

    After first mismatch, every subsequent compare fails with shifted values. Identify the scoreboard policy error.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    if (exp_q.size() && got_q.size()) begin
      exp = exp_q.pop_front();
      got = got_q.pop_front();
      if (!exp.compare(got)) begin
        \`uvm_error("SB", "mismatch");
        // bug: both queues already popped; alignment lost
      end
    end

    Hint

    Think about how to preserve alignment when one compare fails.

    Step-by-step solution

    Diagram
    1) Re-run with verbose queue dumps before and after mismatch.
    2) Show first real mismatch consumes both entries and destroys synchronization context.
    3) Change policy: peek first, pop only on successful match or key-based resolution.
    4) For true mismatches, retain context and perform resynchronization by id/window.
    5) Add a test with one intentional corrupt packet to verify single-fail containment.

    Answer

    Answer: Bug: scoreboard pops both queues before confirming match, causing permanent misalignment after one error. Fix: use peek/deferred-pop or key-based recovery logic.

    Why candidates get it wrong

    A burst of errors can be secondary fallout from one initial mismatch.

    Interviewer follow-up

    How would you implement bounded resync without hiding real consecutive DUT bugs?

    Related topics

    • Back to Scoreboard Puzzles: Mismatch or Ordering Bug?

    • Scenario & Debug Puzzles section

    Previous

    195 / 210

    Next: End-of-Test Draining Missing

    Up next

    Up nextEnd-of-Test Draining Missing

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Out-of-Order Responses Miscompared as Corruption
    • Missing First Transaction After Reset
    • Duplicate Expected Entries from Predictor Retry Path