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

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • Study Route: One Week Before the Interview
  • Study Route: Two Weeks
  • Study Route: Four Weeks (Full Course)4
  • 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 After One Lost Item
      • 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
  • UVM Testbench Puzzles25
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • 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. Out-of-Order Responses Miscompared as Corruption
On this page

    VLSI DV Interview PuzzlesAll levels

    Out-of-Order Responses Miscompared as Corruption

    Burst test shows intermittent mismatches, but waveform indicates DUT data is valid. Protocol allows response reordering by txn_id.

    Puzzle

    Difficulty: Medium · Puzzle 1 of 6 · Topic: Scoreboard Puzzles: Mismatch or Ordering Bug?

    Burst test shows intermittent mismatches, but waveform indicates DUT data is valid. Protocol allows response reordering by txn_id.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    class my_scoreboard extends uvm_component;
      uvm_tlm_analysis_fifo #(txn) exp_fifo;
      uvm_tlm_analysis_fifo #(txn) got_fifo;
      virtual task run_phase(uvm_phase phase);
        txn exp, got;
        forever begin
          exp_fifo.get(exp);
          got_fifo.get(got);
          if (!exp.compare(got))
            \`uvm_error("SB", $sformatf("Mismatch exp=%s got=%s", exp.sprint(), got.sprint()));
        end
      endtask
    endclass

    Hint

    FIFO-to-FIFO compare assumes strict in-order protocol.

    Step-by-step solution

    Diagram
    1) Confirm protocol ordering guarantees for response channel.
    2) Add txn_id to mismatch logs and show IDs are permuted, not corrupted.
    3) Replace strict queue compare with associative matching by stable key (txn_id).
    4) Keep timeout tracking for missing counterpart transactions.
    5) Add directed out-of-order test to lock behavior.

    Answer

    Answer: Bug: scoreboard assumes in-order compare while DUT legally reorders by txn_id. Fix: match expected/actual by transaction identity instead of queue position.

    How this was checked

    Checked by running the code in Verilator 5; the printed output supports the answer above. Plain-SV model of the compare policy: positional compare flags legal reordering, id-keyed matching does not.

    Why candidates get it wrong

    A data mismatch message can be a checker policy bug, not a DUT functional bug.

    Interviewer follow-up

    What should the scoreboard do if two actual transactions arrive with the same txn_id? Model answer: If the protocol allows several outstanding transactions per id, keep a queue per id and match in order per id. If it does not, report a protocol/checker error ('duplicate outstanding id') at the second arrival, because it means a monitor or DUT bug, not a mismatch.

    Say it out loud

    First I check whether the mismatching data is actually the right data arriving in a different order. The root cause is that the scoreboard assumes in-order comparison while the DUT legally reorders responses by transaction id, so this is a checker policy bug, not corruption. I confirm it by seeing that every actual item matches some expected item with the same id. The fix is to match expected and actual by transaction identity instead of queue position.

    Related topics

    • Out-of-Order Matching: A Queue per ID

    • Scoreboards for Messy Traffic: Drops, Reorders, Splits and Merges

    • Back to Scoreboard Puzzles: Mismatch or Ordering Bug?

    • Scenario & Debug Puzzles section

    Previous

    198 / 293

    Next: Missing First Transaction After Reset

    Up next

    Up nextMissing First Transaction After Reset

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Duplicate Transactions from Handle Reuse
    • Mismatch Cascade After One Lost Item
    • End-of-Test Draining Missing