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
      • Early Return Leaves Objection Raised
      • Background Poller Keeps Running After Traffic Ends
      • Semaphore Token Leak on Error Path
      • join_any Ends the Task with the Mailbox Full
      • Lock Inversion with Two Semaphores
      • disable fork Kills the Thread That Owned the Drop
    • 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

←Deadlock Scenario Puzzles: Objection and Phase Stalls
  1. Topics
  2. DV Interview Puzzles
  3. Scenario & Debug Puzzles
  4. Deadlock Scenario Puzzles: Objection and Phase Stalls
  5. Early Return Leaves Objection Raised
On this page

    VLSI DV Interview PuzzlesAll levels

    Early Return Leaves Objection Raised

    run_phase never ends. \`+UVM_OBJECTION_TRACE\` shows one sequence objection remains high. Pinpoint where objection symmetry is broken.

    Puzzle

    Difficulty: Easy · Puzzle 1 of 6 · Topic: Deadlock Scenario Puzzles: Objection and Phase Stalls

    run_phase never ends. \`+UVM_OBJECTION_TRACE\` shows one sequence objection remains high. Pinpoint where objection symmetry is broken.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    class traffic_seq extends uvm_sequence #(my_item);
      \`uvm_object_utils(traffic_seq)
      bit enable_traffic; // defaults to 0
      virtual task body();
        my_item req;
        if (starting_phase != null)
          starting_phase.raise_objection(this);
        if (!enable_traffic)
          return; // bug: drop is skipped
        repeat (50) \`uvm_do(req)
        if (starting_phase != null)
          starting_phase.drop_objection(this);
      endtask
    endclass

    Hint

    Any return/disable path after raise must still execute drop.

    Step-by-step solution

    Diagram
    1) Enable objection trace and identify owner component/object that never drops.
    2) Trace sequence control flow for config paths where enable_traffic is 0.
    3) Confirm return bypasses drop_objection.
    4) Wrap raise/drop with a raised flag and guaranteed cleanup block.
    5) Add lint/checklist item: no naked return after raise_objection.

    Answer

    Answer: Bug: raise_objection executes but return bypasses drop_objection. Fix: structurally guarantee drop in all exits (raised flag + final cleanup).

    How this was checked

    Checked by running the code in Verilator 5 and Icarus Verilog 13; the printed output supports the answer above. Plain-SV model of an objection counter, not the UVM library: the early return leaves the count at 1, the guarded version leaves it at 0. Plain-SV model of an objection counter, not the UVM library: the early return leaves the count at 1, the guarded version leaves it at 0.

    Why candidates get it wrong

    Checking only the config where traffic is enabled misses it; enable_traffic defaults to 0, so every default run takes the leaking path. (starting_phase is deprecated in UVM 1.2, but the symmetry rule is the same for any objection owner.)

    Interviewer follow-up

    Would you enforce objection symmetry with a reusable utility wrapper around sequence body? Model answer: Yes: put the raise/drop in a base-class body() that calls a virtual do_body(), so the drop runs after do_body returns no matter which path it took; and move guards like enable_traffic before the raise.

    Say it out loud

    The default run takes the path where traffic is disabled, so I read that exit path first. The root cause is that raise_objection executes but an early return bypasses drop_objection, so the phase never ends. I confirm it with the objection trace showing a raise with no matching drop. The fix is to guarantee the drop on every exit, for example with a raised flag and a final cleanup that drops it.

    Related topics

    • Objection Triage and Hang Forensics

    • Objection Counting Rules: Raises, Drops, and Edge Cases

    • Back to Deadlock Scenario Puzzles: Objection and Phase Stalls

    • Scenario & Debug Puzzles section

    Previous

    192 / 293

    Next: Background Poller Keeps Running After Traffic Ends

    Up next

    Up nextBackground Poller Keeps Running After Traffic Ends

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Semaphore Token Leak on Error Path
    • join_any Ends the Task with the Mailbox Full
    • Lock Inversion with Two Semaphores