Coverage Regression Strategy
Learn how to use regression results to measure meaningful coverage progress, identify coverage holes, and guide the next verification scenarios.
Learning objectives
- Explain the difference between functional coverage, code coverage, and overall coverage closure.
- Design a regression strategy that collects coverage across tests and seeds.
- Interpret coverage holes and determine whether they require new stimulus, a model change, or a coverage review.
- Use coverage trends to decide what scenarios should be added to the next regression.
Step 1: Understand the concept
A regression can pass every test and still leave important parts of the design unverified. Passing tests answer whether the expected checks succeeded; coverage helps answer whether the verification plan exercised the intended behaviors.
Coverage regression strategy is the practice of collecting, reviewing, and comparing coverage results across regression runs so that verification effort is directed toward meaningful coverage closure.
Coverage should not be treated as a single percentage. A useful strategy considers several dimensions:
- Functional coverage: Did the planned behaviors, modes, transactions, and corner cases occur?
- Code coverage: Which implementation structures were exercised?
- Assertion coverage: Were important properties activated and evaluated?
- Cross coverage: Were important combinations of features exercised?
- Coverage trend: Is the regression actually closing previously identified holes?
Step 2: Build a coverage-aware regression
Suppose the verification plan requires testing different burst lengths, operating modes, and response types. A covergroup can make those goals measurable.
covergroup bus_cg;
burst_len_cp: coverpoint burst_len {
bins single = {1};
bins short = {[2:4]};
bins long = {[5:16]};
}
mode_cp: coverpoint mode {
bins normal = {NORMAL};
bins low_power = {LOW_POWER};
}
response_cp: coverpoint response {
bins ok = {RESP_OK};
bins error = {RESP_ERROR};
}
burst_mode_cross:
cross burst_len_cp, mode_cp;
endgroup
Each regression test contributes observations to these bins. A single test may not hit every bin, so coverage closure normally requires combining results from multiple tests and seeds.
For example, one run might produce:
Coverage summary
---
burst length 100%
operating mode 100%
response type 100%
burst × mode 75%
The 75% cross coverage is more useful than simply saying “overall coverage is high.” It identifies a specific area that still needs attention.
Step 3: Understand coverage holes
A coverage hole is an unhit bin or requirement that has not yet been demonstrated. Before adding another random seed, determine why the bin is empty.
- Is the scenario reachable? The DUT may require a particular sequence of conditions before the behavior can occur.
- Can existing stimulus reach it? If yes, additional seeds or better constraints may be enough.
- Does the testbench permit it? A driver, sequence, configuration, or constraint may unintentionally prevent the scenario.
- Is the coverage model correct? The bin may represent an impossible or irrelevant combination.
- Does the hole represent a real verification risk? High-value uncovered behavior should drive new tests or sequences.
Step 4: Use coverage to guide stimulus
Coverage results should influence what you run next. Consider a coverage report showing that normal-mode traffic is well exercised while long bursts in low-power mode remain uncovered.
Coverage hole:
burst_len = long
mode = low_power
Action:
Create a targeted sequence that requests
long bursts while low-power mode is active.
A targeted sequence is often more efficient than relying on unconstrained randomization to discover a rare combination.
The workflow becomes:
Regression
↓
Collect coverage
↓
Identify meaningful holes
↓
Determine why the hole exists
↓
Add or adjust stimulus
↓
Run targeted test
↓
Measure coverage again Step 5: Compare coverage across regression runs
Coverage regression is also about detecting changes over time. Track important coverage metrics from one regression to the next.
| Metric | Previous run | Current run | Interpretation |
|---|---|---|---|
| Functional coverage | 91% | 94% | New functional behavior was exercised |
| Cross coverage | 72% | 78% | Several combinations were closed |
| Code coverage | 88% | 87% | Investigate whether the decrease is expected |
A coverage decrease is not automatically a verification failure. It may result from a changed design, modified exclusions, changed tests, or a coverage-model update. Treat unexpected movement as a signal that deserves investigation.
Step 6: Merge results carefully
When several tests or seeds contribute to the same coverage model, the regression summary should represent the combined evidence rather than evaluating each run in isolation.
For example:
seed 1001 → bins A, B, C
seed 2002 → bins B, C, D
seed 3003 → bins D, E
Combined → bins A, B, C, D, E
This is why a single random test should not be judged as the complete coverage picture. Coverage closure is usually based on the aggregate result of an intentional test and seed portfolio.
Step 7: Build a practical coverage regression plan
- Define coverage goals. Identify the functional behaviors and important crosses before running a large regression.
- Create a baseline. Record the initial coverage result and known exclusions.
- Run representative tests. Include deterministic scenarios, constrained-random tests, error cases, reset cases, and relevant configurations.
- Collect and merge coverage. Evaluate the aggregate result across the intended regression set.
- Analyze holes. Determine whether each important hole is caused by stimulus, constraints, reachability, or the coverage model.
- Target the remaining gaps. Add sequences or tests that directly exercise meaningful uncovered behavior.
- Track trends. Compare results with previous regressions and investigate unexpected regressions in coverage.
Try it yourself
Design a small coverage regression for a bus agent with these requirements:
- single, short, and long bursts
- normal and low-power modes
- successful and error responses
- at least one burst-length × operating-mode cross
Then answer:
- Which tests would you run first?
- Which scenarios should be deterministic?
- Where would constrained-random stimulus provide the most value?
- What would you do if the long-burst × low-power bin remained empty?
- Which coverage changes would cause you to investigate the regression rather than simply accept the result?
Verification checkpoint
You understand coverage regression strategy when you can use coverage results to make a verification decision rather than treating coverage as a number to maximize.
- Can you explain what a coverage bin represents?
- Can you distinguish a coverage hole from a coverage-model problem?
- Can you explain why multiple seeds and tests are combined?
- Can you identify when targeted stimulus is better than more random stimulus?
- Can you recognize an unexpected coverage regression between two runs?
Key takeaways
- Coverage regression connects regression execution with measurable verification-plan progress.
- Functional, code, assertion, and cross coverage provide different kinds of evidence.
- Investigate the reason behind a coverage hole before adding more random seeds.
- Use targeted sequences to close important or difficult coverage gaps.
- Aggregate coverage across an intentional test and seed portfolio.
- Track coverage trends and investigate unexpected decreases or stagnant coverage.
- Coverage closure is about demonstrating meaningful behavior, not maximizing a percentage.