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?
      • 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 an Event That Already Fired
    • 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
  • UVM Testbench Puzzles25
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • 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
On this page

    VLSI DV Interview PuzzlesAll levels

    Sequence get_response Stall

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

    Puzzle

    Difficulty: Medium · 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.

    How this was checked

    Checked by running the code in Verilator 5; the printed output supports the answer above. Plain-SV model of the response channel (mailbox), not the UVM library: the error path sends no response, so get_response never returns.

    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? Model answer: Add a rsp_required bit (or an enum RSP_NONE/RSP_OK/RSP_ERR in the request) that the sequence sets, and a mandatory status field in the response; the driver always sends exactly one response when rsp_required is set (including the error case), and the sequence calls get_response only when it set the bit.

    Say it out loud

    First I check the response contract on the failing path, because the sequence is stuck waiting in get_response. The root cause is that the driver does not send a response on the error path, while the sequence always waits for one. I confirm it by comparing driver response puts against sequence get_response calls on an error item. The fix is to always return a response, including an error status, or to change the sequence so it does not wait in flows without a response.

    Related topics

    • Responses and Pipelined Drivers

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

    • Scenario & Debug Puzzles section

    Previous

    190 / 293

    Next: Virtual Sequence Waits on an Event That Already Fired

    Up next

    Up nextVirtual Sequence Waits on an Event That Already Fired

    Sign in to save progress

    Practice this lessonPrevious 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