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?
      • Handshake Hang: Missing item_done on One Branch
      • Missing run_phase Objection in Test
      • Wrong Phase: Starting Traffic in shutdown_phase
      • Handshake Violation: item_done Called Twice
      • Sequence get_response Stall
      • Virtual Sequence Waits on Event Never Triggered
    • Deadlock Scenario Puzzles: Objection and Phase Stalls
    • Scoreboard Puzzles: Mismatch or Ordering Bug?
    • Real Interview Rounds: End-to-End Debug Walkthrough
    • Scenario & Debug Puzzles: Tricky Q&A
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Testbench Debug Puzzles: Why Did the Test Hang?
  1. Topics
  2. DV Interview Puzzles
  3. Scenario & Debug Puzzles
  4. Testbench Debug Puzzles: Why Did the Test Hang?
  5. Sequence get_response Stall

VLSI DV Interview Puzzles · All levels

Sequence get_response Stall

Sequence hangs on get_response only when DUT returns error responses. Normal responses complete. Determine the missing piece.

On this page

    Puzzle

    Difficulty: Hard · Puzzle 5 of 6 · Topic: Testbench Debug Puzzles: Why Did the Test Hang?

    Sequence hangs on get_response only when DUT returns error responses. Normal responses complete. Determine the missing piece.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    class rsp_seq extends uvm_sequence #(my_item);
      virtual task body();
        my_item req, rsp;
        repeat (20) begin
          \`uvm_do(req)
          get_response(rsp); // hangs on error cases
        end
      endtask
    endclass
    
    virtual task my_driver::run_phase(uvm_phase phase);
      my_item req, rsp;
      forever begin
        seq_item_port.get_next_item(req);
        rsp = my_item::type_id::create("rsp");
        rsp.set_id_info(req);
        if (req.inject_err) begin
          seq_item_port.item_done();
          continue; // bug: no put_response on this path
        end
        seq_item_port.item_done(rsp);
      end
    endtask

    Hint

    Compare response-path behavior for success and error branches.

    Step-by-step solution

    Diagram
    1) Add response queue depth trace in the sequence around get_response calls.
    2) Correlate hangs to requests with inject_err asserted.
    3) Inspect driver branch and confirm error path never sends response object back.
    4) Return an explicit error response (or stop waiting for response by contract).
    5) Add sequence-level timeout for get_response to expose future response-contract breaks.

    Answer

    Answer: Bug: driver does not put/send response on error path, but sequence always waits for one. Fix: always return a response (including error status) or change sequence contract to not call get_response for no-rsp flows.

    Why candidates get it wrong

    Debugging only successful traffic misses the path that violates the response contract.

    Interviewer follow-up

    How would you encode in the item whether a response is mandatory so sequence behavior is explicit?

    Related topics

    • Back to Testbench Debug Puzzles: Why Did the Test Hang?

    • Scenario & Debug Puzzles section

    Previous

    184 / 210

    Next: Virtual Sequence Waits on Event Never Triggered

    Up next

    Up nextVirtual Sequence Waits on Event Never Triggered

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Handshake Hang: Missing item_done on One Branch
    • Missing run_phase Objection in Test
    • Wrong Phase: Starting Traffic in shutdown_phase