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
      • Named cross bins that group tuples
      • Pure auto cross count
      • Explicit ignore_bins instead of a default catch-all
      • intersect filter removes one tuple
      • illegal cross tuple does not close coverage
      • Three-way cross with overlapping ignore_bins
    • Coverage Options Puzzles
    • 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

←Cross Coverage Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Functional Coverage Puzzles
  4. Cross Coverage Puzzles
  5. intersect filter removes one tuple
On this page

    VLSI DV Interview PuzzlesAll levels

    intersect filter removes one tuple

    Compute final cross percentage when one tuple is explicitly ignored via intersect. Options: none set (all defaults: at_least = 1, weight = 1, auto_bin_max = 64).

    Puzzle

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

    Compute final cross percentage when one tuple is explicitly ignored via intersect. Options: none set (all defaults: at_least = 1, weight = 1, auto_bin_max = 64).

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    covergroup cg with function sample(bit [1:0] cmd, bit [1:0] resp);
      cp_cmd: coverpoint cmd {
        bins c[] = {[0:3]};
      }
      cp_resp: coverpoint resp {
        bins ok    = {0};
        bins retry = {1};
        bins err   = {2};
      }
      x_cmd_resp: cross cp_cmd, cp_resp {
        ignore_bins cmd0_err = binsof(cp_cmd) intersect {0} && binsof(cp_resp.err);
      }
    endgroup
    
    initial begin
      cg c = new();
      c.sample(0,0);
      c.sample(1,1);
      c.sample(2,2);
      c.sample(3,0);
      c.sample(0,2);
      c.sample(1,2);
    end

    Hint

    Auto space is 4x3 before ignore. Then remove exactly one scored tuple.

    Step-by-step solution

    Diagram
    1) Base auto cross bins = 4 * 3 = 12.
    2) ignore_bins removes tuple (cmd=0,resp=err), so scored denominator = 11.
    3) Hit scored tuples are (0,ok), (1,retry), (2,err), (3,ok), (1,err) -> 5 bins.
    4) sample(0,2) is ignored and does not count.
    5) Coverage = 5/11 = 45.45%.

    Answer

    Answer: Scored bins = 11 and achieved coverage = 45.45%.

    How this was checked

    Checked by running a model of the rule in a Python model. A model of the cross rule: 12 tuples minus the one ignored leaves 11 scored, of which 5 are hit.

    Why candidates get it wrong

    The sample (0,2) hits the ignored tuple cmd0_err, so it neither adds to the numerator nor stays in the denominator. Forgetting to shrink the denominator gives 5/12 = 41.67%; counting the ignored hit gives 6/11 = 54.55%.

    Interviewer follow-up

    How many additional unique scored tuples are needed to cross 80%? Model answer: 80% of 11 bins is 8.8, so 9 bins must be hit; 5 are hit already, so 4 more (8/11 = 72.73% is not enough).

    Say it out loud

    I would take the full cross and subtract the ignored tuple, so the denominator is 11. Five bins are hit, which gives 45.45 percent. The sample on the ignored tuple cmd0_err is neither in the numerator nor in the denominator. The trap is forgetting to shrink the denominator, which gives 41.67 percent, or counting the ignored hit, which gives 54.55 percent.

    Related topics

    • binsof & intersect

    • Pruning Crosses: ignore_bins & illegal_bins

    • Back to Cross Coverage Puzzles

    • Functional Coverage Puzzles section

    Previous

    145 / 293

    Next: illegal cross tuple does not close coverage

    Up next

    Up nextillegal cross tuple does not close coverage

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Named cross bins that group tuples
    • Pure auto cross count
    • Three-way cross with overlapping ignore_bins