Module 4: Coverage and Assertions | Intermediate UVM

Coverage Analysis

Learn how to interpret functional coverage results, distinguish meaningful holes from modeling problems, and turn coverage data into engineering decisions.

Learning objectives

  • Explain what functional coverage results can and cannot prove.
  • Interpret coverpoint, cross, and bin-level coverage rather than relying only on the overall percentage.
  • Distinguish missing stimulus from unreachable, irrelevant, or incorrectly modeled coverage.
  • Investigate suspiciously high and suspiciously low coverage.
  • Trace an uncovered bin back through stimulus, constraints, monitor sampling, and the coverage model.
  • Use coverage reports to identify weak verification scenarios and improve stimulus deliberately.
  • Compare coverage across tests and regression runs without confusing percentages with verification completeness.
  • Prepare coverage data for systematic coverage closure in the next lesson.

Step 1: Coverage is evidence, not a verdict

Lessons 31–34 built the coverage model:

  • Lesson 31 defined meaningful coverage requirements.
  • Lesson 32 implemented coverpoints and bins.
  • Lesson 33 added relationships through cross coverage.
  • Lesson 34 established where and when those models should be sampled.

Now the question changes:

What does the coverage result actually tell us?

A coverage percentage is useful, but it is not a direct measurement of verification quality.

For example:

Functional coverage: 98%

That number does not tell you whether the missing 2% represents:

  • an important safety-critical scenario,
  • a rare but required corner case,
  • an impossible combination,
  • a bad constraint,
  • a monitor bug,
  • an incorrect sampling boundary, or
  • a coverage bin that should never have existed.

Coverage analysis is the process of finding out which explanation applies.

Step 2: Start at the bin level

Do not analyze coverage only from the headline percentage.

Suppose a report contains:

operation_cp          100%


region_cp             100%
operation_x_region     83%

The useful question is not "Why is cross coverage 83%?"

The useful question is:

Which exact cross bins are missing?

For example:

operation_x_region

             control   status   data


read                HIT       HIT      HIT
write               HIT       MISS     HIT

Now the missing scenario has a concrete meaning:

write + status

That scenario can be investigated against the specification and verification environment.

Analysis rule: A percentage tells you that something is missing. A bin tells you what is missing.

Step 3: Classify every coverage hole

When a required bin is uncovered, classify the cause before changing the testbench.

Possible cause Typical question
Missing stimulus Does the test suite simply never attempt this scenario?
Restrictive constraints Can the random sequence generate the required values?
Protocol limitation Does the interface or DUT legitimately prevent this combination?
Sampling problem Does the coverage collector sample the correct event?
Monitor problem Does the monitor reconstruct the transaction correctly?
Coverage-model problem Do the bins actually represent the requirement?
Irrelevant scenario Should this combination contribute to the coverage goal at all?
Illegal behavior Should the scenario never occur, and should an assertion or checker detect it?

This classification prevents a common mistake: changing randomization simply to increase the percentage without understanding why the bin is missing.

Step 4: Follow the coverage-debug path

A useful investigation starts with the uncovered bin and works backward toward the DUT and stimulus.

Uncovered bin
 |
 v


Is it required?
|
+---- No ----> Correct/document coverage model
|
+---- Yes
|
v
Can stimulus generate it?
|
+---- No ----> Fix sequence/constraints
|
v
Does DUT accept/exhibit it?
|
+---- No ----> Check specification/DUT behavior
|
v
Does monitor observe it?
|
+---- No ----> Debug monitor/sampling
|
v
Does coverage classify it correctly?
|
+---- No ----> Fix coverage model
|
v
Coverage bin becomes meaningful evidence

This is the central workflow of coverage analysis.

Step 5: Check the coverage model before blaming stimulus

Imagine a coverage model contains:

addr_cp: coverpoint item.addr {
bins control = {[32'h0000_0000 : 32'h0000_00FF]};
bins status  = {[32'h0000_0100 : 32'h0000_01FF]};
bins data    = {[32'h0000_1000 : 32'h0000_1FFF]};


}

Suppose status never gets covered.

Before modifying constraints, verify:

  1. Does the specification actually define this address region?
  2. Is the address range correct?
  3. Does the monitor publish the full address?
  4. Is the coverage sampled from accepted transactions?
  5. Does the sequence have access to this region?
  6. Do constraints exclude the range?

A typo in a bin range can look exactly like a stimulus problem.

Coverage analysis therefore requires knowledge of both the verification environment and the coverage model.

Step 6: Investigate suspiciously high coverage

High coverage is not automatically good news.

Suppose a complex cross reaches 100% after a single short test.

Ask whether:

  • the bins are too broad,
  • the cross does not represent enough functional detail,
  • the same transaction is sampled more than once,
  • invalid or intermediate transactions are being sampled,
  • the monitor is reporting stimulus attempts rather than accepted behavior, or
  • important dimensions were simply omitted from the model.

For example, this coverage model:

operation_cp:
read
write

may reach 100% immediately while the verification plan actually requires coverage of:

operation
x


address region
x
privilege mode
x
response type

High coverage can therefore indicate either excellent stimulus or an overly weak measurement model.

Important: Coverage closure is not achieved by making the percentage larger. The measurement itself must be strong enough to support the verification claims.

Step 7: Compare coverage with the verification plan

A useful coverage analysis process connects report results back to requirements.

Requirement Coverage model Result Interpretation
Read/write behavior in each region operation × region 83% Investigate missing write/status
All supported operating modes mode coverpoint 100% All planned modes observed
Errors for supported request types operation × response 75% Identify missing error combination

This is much more useful than a single statement such as:

"The regression achieved 94% functional coverage."

The coverage plan tells you what that percentage means.

Step 8: Distinguish coverage from correctness

Coverage and checking answer different questions.

Observation What it proves What it does not prove
Read operation bin is covered A sampled read occurred The read result was correct
Write × status cross bin is covered The combination occurred The DUT handled it correctly
Latency bin is covered A transaction with that latency occurred The latency was within the specification
Assertion has no failures The checked property did not fail during observed simulation All required functional scenarios occurred
Scoreboard has no mismatches No detected comparison failures occurred All planned scenarios were exercised

A strong verification environment combines coverage with functional checking and assertions rather than using one measurement as a substitute for another.

Step 9: Analyze coverage across tests

Coverage is usually collected over many tests and regression seeds.

Consider three tests:

Test A:
operation_x_region = 66%


Test B:
operation_x_region = 83%

Test C:
operation_x_region = 66%

The useful analysis is not simply that Test B is "best."

Instead, determine which bins each test contributes.

                 A    B    C


read/control      X    X    X
read/status       X    X    X
read/data         X    X    X
write/control          X    X
write/status            X
write/data         X    X    X

Here, Test B contributes a unique scenario:

write + status

This helps answer important regression questions:

  • Which test hits a particular corner case?
  • Which scenarios require many seeds?
  • Which tests contribute little new functional coverage?
  • Did a new test actually expand the verification space?

Coverage analysis therefore helps evaluate the quality and contribution of tests, not just the final percentage.

Step 10: Understand cumulative coverage

Suppose two tests individually produce:

Test A: 70%


Test B: 70%

The combined regression can still reach:

Combined: 90%

because the tests may hit different bins.

Conversely, adding many tests does not guarantee meaningful improvement if they repeatedly exercise the same scenarios.

This leads to an important regression concept:

Test count != verification-space coverage

A productive regression is one that adds meaningful evidence, not simply more simulation time.

Step 11: Use coverage data to debug constraints

Coverage holes often reveal problems in random stimulus.

Suppose the requirement is:

All supported burst lengths


x
all operating modes

But one cross bin remains permanently uncovered.

Inspect the constraints:

constraint burst_mode_c {
if (mode == DEBUG)
    burst_len inside {[1:4]};


}

Suppose the missing bin requires:

mode = DEBUG


burst_len = 8

The coverage report has exposed a stimulus constraint that prevents the required scenario.

That does not automatically mean the constraint is wrong. The specification may intentionally prohibit the combination.

The correct analysis is:

Missing bin
|
v


Specification:
Is DEBUG + burst 8 legal?
|
+-- No --> Coverage model may need exclusion
|
+-- Yes
|
v
Constraint incorrectly prevents it
|
v
Modify stimulus constraints
|
v
Run targeted test
|
v
Verify bin is now covered

Step 12: Use targeted experiments

When investigating a coverage hole, a small directed experiment is often more useful than launching a large regression.

Suppose the missing bin is:

write + status

Create a minimal sequence that attempts exactly that scenario.

task body();

packet req;

req = packet::type_id::create("req");

start_item(req);

req.write = 1;
req.addr  = 32'h0000_0100;
req.data  = 32'h1234_5678;

finish_item(req);


endtask

Then inspect:

  1. Was the item generated?
  2. Was it driven?
  3. Was it accepted by the DUT?
  4. Did the monitor reconstruct it?
  5. Did the coverage subscriber receive it?
  6. Did sample() execute?
  7. Did the intended cross bin become covered?

This isolates the problem much faster than changing multiple parts of the environment at once.

Step 13: Build a coverage-analysis report

A useful coverage review should capture decisions, not just percentages.

For each significant hole, record:

Field Example
Coverage item write × status
Requirement Status registers must support writes
Observed coverage Uncovered
Suspected cause Sequence constraint
Investigation Directed test attempted the combination
Result Monitor accepted transaction but bin remained empty
Final diagnosis Incorrect address-region bin range
Action Correct coverage model and rerun regression

This turns coverage analysis into an engineering record that can be reviewed and reproduced.

Step 14: Recognize weak coverage models

A coverage model can be technically correct and still be too weak to support the verification plan.

Warning signs include:

  • Coverage reaches 100% unusually early.
  • Only easy-to-generate values are covered.
  • Important specification boundaries have no bins.
  • Important relationships have no crosses.
  • Large portions of behavior are represented by one broad bin.
  • Coverage does not distinguish normal and corner-case behavior.
  • Engineers cannot explain what a bin means in terms of a requirement.

For example:

addr_cp:
bins all_addresses = {[0 : 32'hFFFF_FFFF]};

may produce excellent-looking coverage after a few transactions while saying very little about meaningful address behavior.

A stronger model might distinguish:

control


status
data
lower_boundary
upper_boundary
reserved 

The right model depends on the specification, but the principle is universal:

Coverage must measure behavior at the level of detail required by the verification plan.

Step 15: Coverage analysis versus coverage closure

These concepts are related but not identical.

Coverage analysis Coverage closure
Understand what is covered Drive the project toward the required coverage goals
Find uncovered bins Determine and execute actions to cover them
Identify model weaknesses Improve the model where necessary
Classify holes Resolve or justify the holes
Interpret regression data Manage coverage progress over time

Lesson 35 teaches the analysis process.

Lesson 36 will focus on coverage closure: systematically deciding whether to improve stimulus, constraints, coverage models, tests, or exclusions until the verification plan has sufficient evidence.

Common mistakes

Treating the overall percentage as the answer

A percentage hides which scenarios are missing. Always inspect significant uncovered bins and crosses.

Changing constraints immediately

An uncovered bin may be caused by the coverage model, monitor, sampling boundary, or specification—not necessarily by stimulus constraints.

Assuming uncovered means unreachable

A scenario can be perfectly legal but simply absent from the current tests. Prove why a bin is unreachable before excluding it.

Assuming 100% means complete verification

100% of a weak model can still leave important behavior unmeasured. Review the coverage plan and requirements.

Ignoring suspiciously high coverage

Very fast coverage closure can indicate broad bins, missing dimensions, duplicate sampling, or incorrect transaction boundaries.

Using more seeds as the only solution

More random seeds can help with rare scenarios, but they cannot fix a broken monitor, incorrect sampling event, impossible constraint, or weak coverage model.

Confusing coverage with correctness

A covered bin proves that the measured scenario occurred. It does not prove that the DUT behaved correctly during that scenario.

Exercise 1: Analyze an uncovered cross

Your report shows:

operation_x_region

             control   status   data


read                HIT       HIT      HIT
write               HIT       MISS     HIT

Investigate the missing bin write + status.

Write down:

  1. The requirement represented by the bin.
  2. Whether the scenario is legal.
  3. Whether the sequence can generate it.
  4. Whether constraints allow it.
  5. Whether the DUT accepts it.
  6. Whether the monitor observes it.
  7. Whether the coverage model classifies it correctly.

Exercise 2: Find the weak model

A new protocol environment reaches 100% functional coverage after only a few transactions.

The current model contains:

operation:
read
write


response:
success
error

The specification also contains:

  • four operating modes,
  • three address regions,
  • multiple burst lengths,
  • special boundary addresses,
  • error behavior that differs by request type.

Identify at least five coverage dimensions or relationships that are missing from the current model.

For each, explain why it matters.

Exercise 3: Suspiciously high coverage

A rare corner-case bin reaches 100% after one transaction.

List at least five possible causes and describe the evidence you would collect to distinguish them.

At least one explanation should involve:

  • sampling architecture,
  • monitor behavior,
  • coverage-model design,
  • stimulus, and
  • duplicate sampling.

Exercise 4: Compare two tests

Test A and Test B each report 80% coverage.

After merging their results, cumulative coverage reaches 95%.

Explain:

  1. Why the cumulative result can be higher than either individual test.
  2. What this tells you about the scenarios exercised by the tests.
  3. What additional analysis would tell you whether Test B provides valuable new coverage.

Challenge: Perform a real coverage investigation

Choose a small UVM environment or protocol project.

Find one uncovered functional-coverage bin from a real or simulated report.

Perform the following investigation:

  1. State the requirement represented by the bin.
  2. Confirm that the bin is required.
  3. Trace the intended sampling event.
  4. Inspect the monitor transaction that should produce the bin.
  5. Check the relevant sequence and constraints.
  6. Run a minimal directed experiment.
  7. Determine whether the problem is stimulus, constraint, DUT behavior, monitor, sampling, or coverage modeling.
  8. Document the final action.

Do not count the investigation as complete simply because the bin eventually becomes covered. Explain why it was missing and why the chosen fix is correct.

Knowledge check

  1. Why is a coverage percentage insufficient for diagnosing a verification gap?
  2. Why should analysis begin at the bin level?
  3. What are several possible causes of an uncovered required bin?
  4. Why should the coverage model itself be checked before changing random constraints?
  5. How can suspiciously high coverage indicate a problem?
  6. Why can two tests with the same individual coverage percentage contribute very different amounts of cumulative coverage?
  7. What does a covered cross bin prove, and what does it not prove?
  8. Why are targeted experiments useful during coverage analysis?
  9. How can coverage expose an overly restrictive constraint?
  10. What is the difference between coverage analysis and coverage closure?
Self-check: You understand this lesson when an uncovered bin no longer looks like "just a missing percentage." You should be able to translate it into a requirement, trace how that scenario should occur, investigate the environment, and determine what engineering action is actually justified.

Key takeaways

  • Functional coverage is evidence about exercised scenarios, not a direct measure of verification completeness.
  • Analyze specific bins and crosses instead of relying only on aggregate percentages.
  • An uncovered bin can result from stimulus, constraints, protocol limitations, monitor behavior, sampling architecture, or the coverage model itself.
  • Always confirm that a coverage hole represents a real requirement before trying to close it.
  • Suspiciously high coverage deserves investigation just as suspiciously low coverage does.
  • Coverage should be analyzed together with the verification plan, scoreboards, assertions, and other evidence.
  • Targeted experiments are often more effective than immediately running larger regressions.
  • Cumulative coverage depends on the unique scenarios contributed by tests, not simply the number of tests.
  • Coverage analysis explains the holes; coverage closure determines how those holes should be resolved.

What comes next

Lesson 36: Coverage Closure takes the analysis performed here and turns it into a repeatable closure process.

You now know how to ask whether an uncovered bin represents missing stimulus, an overly restrictive constraint, a monitor or sampling problem, an incorrect coverage model, or an intentionally unreachable scenario.

The next step is to manage those findings systematically: prioritize coverage holes, choose between directed and constrained-random stimulus, improve constraints without creating biased regressions, justify exclusions, track progress, and decide when the verification plan has enough evidence to consider coverage closed.