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
      • auto_bin_max and at_least together
      • Weighted aggregate coverage math
      • per_instance exposure of hidden holes
      • type_option.at_least across all instances
      • type_option.auto_bin_max bin grouping
      • option.weight zero removes metric influence
    • Coverage Closure and Sampling Timing Puzzles
    • Functional Coverage Puzzles: Tricky Q&A
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Coverage Options Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Functional Coverage Puzzles
  4. Coverage Options Puzzles
  5. per_instance exposure of hidden holes

VLSI DV Interview Puzzles · All levels

per_instance exposure of hidden holes

With per-instance tracking enabled, compute each instance coverage and type-level average.

On this page

    Puzzle

    Difficulty: Medium · Puzzle 3 of 6 · Topic: Coverage Options Puzzles

    With per-instance tracking enabled, compute each instance coverage and type-level average.

    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

    per_instance=1 keeps c0 and c1 separate instead of merged.

    Step-by-step solution

    Diagram
    1) c0 hits off and on -> 2/2 = 100% inst coverage.
    2) c1 hits only off -> 1/2 = 50% inst coverage.
    3) Type-level get_coverage with per_instance=1 reflects instance average -> (100 + 50)/2 = 75%.

    Answer

    Answer: c0.get_inst_coverage()=100%, c1.get_inst_coverage()=50%, and type coverage is 75%.

    Why candidates get it wrong

    Without per-instance thinking, merged closure can hide one unexercised interface instance.

    Interviewer follow-up

    How would results appear if option.per_instance were left at 0?

    Related topics

    • Back to Coverage Options Puzzles

    • Functional Coverage Puzzles section

    Previous

    144 / 210

    Next: type_option.at_least across all instances

    Up next

    Up nexttype_option.at_least across all instances

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • auto_bin_max and at_least together
    • type_option.auto_bin_max bin grouping
    • option.weight zero removes metric influence