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
    • Covergroup and Coverpoint Puzzles
    • Cross Coverage Puzzles
    • Coverage Options Puzzles
    • Coverage Closure and Sampling Timing Puzzles
      • Sampling region off-by-one on state bins
      • Unreachable bin from stimulus constraints
      • Sampling on a derived clock sees the updated value
      • Reset-time samples filtered by iff
      • Unreachable cross tuple from protocol rules
      • at_least threshold causes closure plateau
    • Functional Coverage Puzzles: Tricky Q&A
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • UVM Testbench Puzzles25
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • DV Puzzle Cheatsheet
Loading lesson

←Coverage Closure and Sampling Timing Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Functional Coverage Puzzles
  4. Coverage Closure and Sampling Timing Puzzles
  5. Unreachable bin from stimulus constraints
On this page

    VLSI DV Interview PuzzlesAll levels

    Unreachable bin from stimulus constraints

    Why does this coverpoint plateau at 75% forever, and what is the correct closure action? Options: none set (all defaults: at_least = 1, weight = 1, auto_bin_max = 64).

    Puzzle

    Difficulty: Easy · Puzzle 2 of 6 · Topic: Coverage Closure and Sampling Timing Puzzles

    Why does this coverpoint plateau at 75% forever, and what is the correct closure action? Options: none set (all defaults: at_least = 1, weight = 1, auto_bin_max = 64).

    Code

    tb.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 tr;
      rand bit [1:0] opcode;
      constraint legal_c { opcode inside {[0:2]}; }
    endclass
    
    module tb;
      covergroup cg with function sample(bit [1:0] opcode);
        cp_opcode: coverpoint opcode {
          bins op0 = {0};
          bins op1 = {1};
          bins op2 = {2};
          bins op3 = {3};
        }
      endgroup
    
      cg c = new();
      tr t = new();
    
      initial repeat (10000) begin
        void'(t.randomize());
        c.sample(t.opcode);
      end
    endmodule

    Hint

    Check whether op3 can ever be generated under legal_c.

    Step-by-step solution

    Diagram
    1) Constraint legal_c allows only 0,1,2.
    2) Bin op3 is unreachable by construction.
    3) Maximum achievable legal hit bins are 3 of 4 -> 75% ceiling.
    4) Closure fix: decide from the spec what opcode 3 is. If it is reserved or illegal, the stimulus is right and the model is wrong: mark op3 illegal_bins (it must never occur) or ignore_bins (legal but out of scope), with the spec reference; the denominator becomes 3 and coverage reaches 100%. If opcode 3 is a legal operation, legal_c is a stimulus bug: relax it so op3 can be generated. Either way, more seeds never help (10000 randomized samples here still give 3/4).

    Answer

    Answer: Coverage ceiling is 75% because op3 is unreachable. This is a model mismatch, not a random stimulus deficiency. The action depends on the spec: reserved or illegal opcode 3 -> illegal_bins/ignore_bins with a reference; legal opcode 3 -> relax legal_c.

    How this was checked

    Checked by running the code in Verilator 5; the printed output supports the answer above. Randomizing with legal_c 10000 times never produces opcode 3, so the model caps at 3 of 4 bins (a counter stands in for the covergroup).

    Why candidates get it wrong

    Teams often burn regression time trying to close a mathematically unreachable bin.

    Interviewer follow-up

    What evidence would you include in a waiver request for op3? Model answer: The spec or design reference showing opcode 3 is reserved or not allowed, the constraint (legal_c) that excludes it, a formal or reachability result showing it cannot be generated, regression statistics showing zero hits over many seeds as supporting evidence, and reviewer sign-off. Then replace the bin by ignore_bins or illegal_bins rather than just deleting it.

    Say it out loud

    I would first ask whether the missing bin is reachable at all. Coverage plateaus at 75 percent because opcode 3 is unreachable under the stimulus constraints, which is a model mismatch, not a lack of random stimulus. The action depends on the spec: if 3 is reserved or illegal, I would mark it illegal or ignored with a reference, and if it is legal I would relax the constraint. The trap is burning regression time on an impossible bin.

    Related topics

    • Hole Analysis and Triage

    • Holes and Unreachable Bins

    • Back to Coverage Closure and Sampling Timing Puzzles

    • Functional Coverage Puzzles section

    Previous

    155 / 293

    Next: Sampling on a derived clock sees the updated value

    Up next

    Up nextSampling on a derived clock sees the updated value

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Reset-time samples filtered by iff
    • Unreachable cross tuple from protocol rules
    • at_least threshold causes closure plateau