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
      • Auto vs explicit bins with illegal transition context
      • Default bin denominator puzzle
      • Bin array math with mixed declarations
      • Transition bin sequence counting
      • illegal_bins vs ignore_bins accounting
      • Same traffic, different denominator
    • Cross Coverage Puzzles
    • Coverage Options Puzzles
    • 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

‹Covergroup and Coverpoint Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Functional Coverage Puzzles
  4. Covergroup and Coverpoint Puzzles
  5. illegal_bins vs ignore_bins accounting

VLSI DV Interview Puzzles · All levels

illegal_bins vs ignore_bins accounting

Compute legal coverage and classify each sampled value as legal, ignored, or illegal.

On this page

    Puzzle

    Difficulty: Medium · Puzzle 5 of 6 · Topic: Covergroup and Coverpoint Puzzles

    Compute legal coverage and classify each sampled value as legal, ignored, or illegal.

    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 [3:0] req_len);
      cp_len: coverpoint req_len {
        bins short = {[1:4]};
        bins long  = {[5:8]};
        ignore_bins keepalive = {0};
        illegal_bins too_big  = {[9:15]};
      }
    endgroup
    
    initial begin
      cg c = new();
      c.sample(0);
      c.sample(3);
      c.sample(6);
      c.sample(10);
      c.sample(2);
      c.sample(15);
    end

    Hint

    Only short and long are legal scored bins in the denominator.

    Step-by-step solution

    Diagram
    1) Legal bins are short and long -> denominator 2.
    2) Hits: short hit by 3 and 2, long hit by 6.
    3) Value 0 is ignored (keepalive), values 10 and 15 are illegal.
    4) Legal coverage is 2/2 = 100% with two illegal hits logged.

    Answer

    Answer: Legal coverage is 100% (short and long both hit). Sample classification: ignored={0}, illegal={10,15}, legal={3,6,2}.

    Why candidates get it wrong

    Ignore and illegal activity can be present even when legal coverage is 100%, so closure does not imply protocol correctness.

    Interviewer follow-up

    Would you keep too_big as illegal_bins or move it to assertions for better debug diagnostics?

    Related topics

    • Back to Covergroup and Coverpoint Puzzles

    • Functional Coverage Puzzles section

    Previous

    134 / 210

    Next: Same traffic, different denominator

    Up next

    Up nextSame traffic, different denominator

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Auto vs explicit bins with illegal transition context
    • Default bin denominator puzzle
    • Bin array math with mixed declarations