It is crucial to understand the difference:
- option: Applies to the specific instance of the covergroup.
- type_option: Applies to the covergroup type (statically for all instances).
Fine-tune how your coverage is collected and reported. Use options to set goals, minimum hits, and control aggregation behavior.
It is crucial to understand the difference:
| Option | Description | Default |
|---|---|---|
option.weight |
Importance of this coverpoint (0 to disable). | 1 |
option.goal |
Target coverage percentage for this item. | 100 |
option.at_least |
Minimum hits required to mark a bin as "Covered". | 1 |
option.auto_bin_max |
Max number of automatically created bins. | 64 |
option.per_instance |
If 1,
coverage is reported separately for every new() instance. |
0 |
covergroup cg_config;
// Track coverage per instance (e.g., separate for Master 1 vs Master 2)
option.per_instance = 1;
option.comment = "Tracks register configurations";
cp_addr: coverpoint addr {
// We need to see this address at least 5 times
option.at_least = 5;
}
cp_error: coverpoint error_flag {
// This is low priority, don't let it drag down overall score
option.weight = 0;
}
endgroup
weight = 0 when you want to collect data for analysis (e.g., "See what
happened"), but you don't want the result to affect the overall coverage grade. It's
often used for "informational" coverpoints.
per_instance=1, you will see a specific report for Gen1 (only A covered)
and Gen2 (only B covered).