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
      • auto_bin_max and at_least together
      • Weighted aggregate coverage math
      • Instance coverage, type coverage and merge_instances
      • option.at_least per instance with averaged type coverage
      • auto_bin_max is ignored once bins are explicit
      • option.weight zero removes metric influence
    • Coverage Closure and Sampling Timing Puzzles
    • 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 Options Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Functional Coverage Puzzles
  4. Coverage Options Puzzles
  5. option.at_least per instance with averaged type coverage
On this page

    VLSI DV Interview PuzzlesAll levels

    option.at_least per instance with averaged type coverage

    Compute each instance coverage and the type coverage. Options set: option.per_instance = 1, option.at_least = 2 (covergroup level, inherited by cp_err), type_option.merge_instances = 0 (type coverage is the weighted average of the instances; instance weights are 1). There is no type_option.at_least: at_least is an instance option.

    Puzzle

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

    Compute each instance coverage and the type coverage. Options set: option.per_instance = 1, option.at_least = 2 (covergroup level, inherited by cp_err), type_option.merge_instances = 0 (type coverage is the weighted average of the instances; instance weights are 1). There is no type_option.at_least: at_least is an instance option.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    covergroup cg with function sample(bit err);
      option.per_instance = 1;
      option.at_least = 2;
      type_option.merge_instances = 0;
      cp_err: coverpoint err {
        bins zero = {0};
        bins one  = {1};
      }
    endgroup
    
    initial begin
      cg c0 = new();
      cg c1 = new();
      c0.sample(0);
      c0.sample(1);
      c1.sample(1);
      c1.sample(1);
    end

    Hint

    Each bin of each instance needs 2 hits on its own. Then average the two instance numbers.

    Step-by-step solution

    Diagram
    1) c0: zero has 1 hit, one has 1 hit, neither reaches 2 -> 0/2 = 0%.
    2) c1: one has 2 hits and is covered, zero has 0 -> 1/2 = 50%.
    3) With merge_instances = 0 the type coverage is the weighted average of the instances: (0 + 50) / 2 = 25%.

    Answer

    Answer: c0 = 0%, c1 = 50%, type coverage = 25%.

    How this was checked

    Checked by running a model of the rule in a Python model. A model of the at_least rule: c0 never reaches 2 hits on a bin, c1 does on one bin, and the type average is 25%.

    Why candidates get it wrong

    c0 touched both bins yet covers none of them, because one hit is below at_least = 2. The hits of c0 and c1 are not added up when merge_instances = 0, and writing type_option.at_least is not legal.

    Interviewer follow-up

    What is the minimum number of extra samples that makes every instance 100%? Model answer: Four: c0 needs one more 0 and one more 1 (2 samples), c1 needs two more 0 hits (2 samples). Both instances and the type are then 100%.

    Say it out loud

    I would apply at_least to each instance separately. Instance c0 touched both bins but only once each, below the threshold of two, so it is 0 percent, and c1 is 50 percent. With merge_instances zero the type coverage is the average, 25 percent. The trap is adding the hits of both instances together, and writing type_option.at_least, which is not legal.

    Related topics

    • option.per_instance & Instance Options

    • Weights, Goals & at_least

    • Back to Coverage Options Puzzles

    • Functional Coverage Puzzles section

    Previous

    151 / 293

    Next: auto_bin_max is ignored once bins are explicit

    Up next

    Up nextauto_bin_max is ignored once bins are explicit

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • auto_bin_max and at_least together
    • Weighted aggregate coverage math
    • option.weight zero removes metric influence