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
    • 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
      • Manual sample called at wrong phase
      • get_coverage vs get_inst_coverage interpretation
      • Unreachable cross tuple from protocol rules
      • at_least threshold causes closure plateau
    • Functional Coverage Puzzles: Tricky Q&A
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • Interview Prep: Puzzle Rounds5
  • 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. get_coverage vs get_inst_coverage interpretation

VLSI DV Interview Puzzles · All levels

get_coverage vs get_inst_coverage interpretation

Compute each instance and overall coverage, then map which API reports which number.

On this page

    Puzzle

    Difficulty: Medium · Puzzle 4 of 6 · Topic: Coverage Closure and Sampling Timing Puzzles

    Compute each instance and overall coverage, then map which API reports which number.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    covergroup cg with function sample(bit mode);
      option.per_instance = 1;
      cp_mode: coverpoint mode {
        bins off = {0};
        bins on  = {1};
      }
    endgroup
    
    initial begin
      cg c0 = new();
      cg c1 = new();
      c0.sample(0);
      c0.sample(1);
      c1.sample(0);
    end

    Hint

    With per_instance=1, instance and type numbers are intentionally different.

    Step-by-step solution

    Diagram
    1) c0 hits both bins -> c0.get_inst_coverage() = 100%.
    2) c1 hits one bin -> c1.get_inst_coverage() = 50%.
    3) Type get_coverage aggregates instance results -> (100 + 50)/2 = 75%.
    4) Therefore get_coverage and get_inst_coverage answer different questions.

    Answer

    Answer: Instance coverage: c0=100%, c1=50%; type coverage: 75%. Use get_inst_coverage for per-instance holes, get_coverage for aggregate status.

    Why candidates get it wrong

    A single aggregate number can hide bad actors when one instance is strong and another is weak.

    Interviewer follow-up

    What dashboard would you build to prevent signoff on 75% aggregate with a 50% critical instance?

    Related topics

    • Back to Coverage Closure and Sampling Timing Puzzles

    • Functional Coverage Puzzles section

    Previous

    151 / 210

    Next: Unreachable cross tuple from protocol rules

    Up next

    Up nextUnreachable cross tuple from protocol rules

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Sampling region off-by-one on state bins
    • Unreachable bin from stimulus constraints
    • at_least threshold causes closure plateau