Skip to Sampling + closure questions

Part 3 · Sampling and closure

Sampling + closureSampling ownership, regression evidence, and closure

Sample accepted behavior exactly once, merge compatible evidence, preserve instance visibility, and close every meaningful hole with an owned disposition.

Question directory

Questions for Sampling + closure

Open an authored answer, then connect it to the evidence diagram and the related practice-bank prompt.

  1. Sampling semanticsWhen should event-based sampling be used instead of sample()?Coverage and closure
  2. Sampling semanticsWhere should functional coverage live in a UVM environment?Coverage and closure
  3. Sampling semanticsWhy can sampling at the clock edge record the wrong value?Coverage and closure
  4. Regression evidenceWhat does a merged coverage database represent?Coverage and closure
  5. Regression evidenceWhen is option.per_instance useful?Coverage and closure
  6. Regression evidenceWhat do goal, weight, and auto_bin_max change?Coverage and closure
  7. ClosureWhat does coverage closure actually mean?Coverage and closure
  8. ClosureHow should an unhit functional bin be investigated?Coverage and closure
  9. ClosureHow should code and functional coverage disagreements be interpreted?Coverage and closure

Sampling semanticsSample the transaction that actually happened

The best model is still wrong if it observes a drive attempt, stale signal, partial transaction, duplicate publication, or invalid protocol outcome.

Concept model

Move from pins to one owned, stable observation

  1. 0Drivevalid + payload
  2. 1Acceptvalid && ready
  3. 2Observemonitor builds txn
  4. 3Classifychecker result
  5. 4Sampleone coverage hit
Pins
attemptValid without ready may not be an accepted transfer.
Monitor
transactionReconstructs stable protocol meaning from sampled signals.
Checker
classificationSeparates correct results, errors, and expected failures.
Collector
one sampleCounts the intended observation exactly once.

A monitor reconstructs the accepted transaction, publishes it once, and lets independent consumers check and cover it. Coverage tied to a checked outcome can sample a classified result later.

Strong answer

Use an event when the covergroup has one unambiguous stable sampling point. Use manual sampling when a transaction or its classification is assembled later or the correct sample context varies.

Reason it through

  • Manual sampling can pass stable transaction fields directly into a covergroup.
  • An event is concise when every observation shares the same clock and acceptance rule.
  • Whichever style you choose, define reset, validity, and duplicate-sample behavior explicitly.
Practice a related question in the bank
Strong answer

Usually in a dedicated subscriber or collector fed by monitor transactions. Coverage tied to a checked outcome may consume scoreboard-classified observations instead.

Reason it through

  • The monitor owns protocol reconstruction and publishes facts without knowing every consumer.
  • Analysis fanout keeps checking and coverage independently reusable.
  • Protocol violations still need assertions or error coverage even if successful transactions are covered later.
Practice a related question in the bank
Strong answer

The DUT, interface, monitor, and coverage code may act in different scheduling regions. Sampling before the observed transaction is stable can capture the prior or partially updated state.

Reason it through

  • Clocking blocks and monitor architecture can establish a deterministic observation region.
  • Sampling a reconstructed transaction avoids reaching back into changing pin-level signals.
  • Counters should reconcile one accepted transfer with one monitor publication and one intended coverage sample.
Practice a related question in the bank

Regression evidenceMerge runs without losing meaning

Merged coverage is a union of compatible bin hits, not an average of percentages. Reproducible metadata and per-instance visibility keep the result interpretable.

Concept model

Union compatible bin evidence across a regression

RunB0B1B2B3B4
smoke
error
stress
directed
merged
Aggregate type100%looks closedchannel[0]100%completechannel[1]42%hidden gap
Merge
set unionRepeated hits remain one covered goal.
Instance
per_instanceShows whether every replicated channel met its obligation.
Goal
report targetChanges the reported target, not what behavior occurred.
Weight
roll-up influenceChanges aggregation without creating new evidence.

Each run contributes unique hits to the merged database. Model version, design revision, configuration, and instance identity determine whether that union is valid.

Strong answer

It represents the union of compatible bin hits across selected runs. It is meaningful only when the design, model, configuration, and merge policy are controlled.

Reason it through

  • Two 50% runs can merge to anywhere from 50% to 100% depending on overlap.
  • Changing bin definitions or model identity can invalidate a direct union.
  • Archive the exact run manifest so the result can be reproduced and audited.
Practice a related question in the bank
Strong answer

Use instance-level visibility when replicated agents, channels, or interfaces have separate obligations. Aggregate type coverage is sufficient only when instances are truly interchangeable for the goal.

Reason it through

  • A global 100% can hide one idle instance if another instance hits every bin.
  • Per-instance reporting costs database space and closure effort, so enable it deliberately.
  • Tie the choice to whether the plan requires every replica to demonstrate the behavior.
Practice a related question in the bank
Strong answer

Goal sets a reporting target, weight changes contribution to an aggregate score, and auto_bin_max limits automatic partitioning. None of them creates verification evidence.

Reason it through

  • Changing a goal can make a report look complete without adding a single hit.
  • Weight expresses reporting policy and can hide or amplify a component in roll-up.
  • Automatic-bin limits control resolution and should not replace explicit semantic bins.
Practice a related question in the bank

ClosureClose holes with a disposition, not a denominator

Closure means planned reachable goals are hit and every remaining hole has a reviewed explanation supported by stimulus, reachability, model, or specification evidence.

Concept model

Use disagreement between metrics as a diagnostic

CodeFunctionalRead asInvestigate
highhighCheckers + bugsstrong evidence, still review
highlowFunctional gapscenario, model, or sampling
lowhighStructural gapdead RTL or coarse model
lowlowEnvironment gapstimulus or maturity
  1. 1required?
  2. 2reachable?
  3. 3generated?
  4. 4observed?
  5. 5sampled?
  6. 6merged?
Required?
plan + riskConfirm the hole represents real intent before chasing it.
Reachable?
stimulus or proofSeparate a generation problem from impossibility.
Observed?
monitor + sampleTrace the event through reconstruction and coverage.
Reviewed?
owned dispositionNo residual hole disappears without accountable evidence.

Code-high and functional-low points to missing scenarios or models; functional-high and code-low points to unexercised implementation or a coarse model. Neither quadrant replaces checking and bug review.

Strong answer

Planned reachable goals are hit, remaining holes have evidence-backed dispositions, exclusions are reviewed, and complementary checking and bug evidence support the release decision.

Reason it through

  • Closure is scoped to a version, configuration set, plan, and signoff policy.
  • A justified unreachable goal can be closed without fabricating a hit.
  • High coverage does not erase open correctness failures or weak checking.
Practice a related question in the bank
Strong answer

Validate the requirement and bin first, then inspect reachability, constraints, generated traffic, monitor reconstruction, sample conditions, and database merge status in that order.

Reason it through

  • The sequence prevents wasted seed farming when the model itself is wrong.
  • Use a targeted reproducer or formal reachability result to separate generation from impossibility.
  • Record the final fix or disposition with an owner and reviewer.
Practice a related question in the bank
Strong answer

Treat the mismatch as diagnostic evidence. Structural holes suggest unexercised RTL; functional holes suggest missing scenarios, coarse stimulus, or model and sampling gaps. Investigate both before waiving either.

Reason it through

  • Functional-high and code-low can mean the functional model is too coarse or dead implementation remains.
  • Code-high and functional-low can mean required combinations were never modeled or observed.
  • Both-high still requires strong checkers, reviewed bugs, and plan traceability.
Practice a related question in the bank