Professional Documents
Culture Documents
Coverage
Dr. O. Ait Mohamed
ECE Department
Concordia university
Winter 2021
Objectives
• Explain the different flavors of coverage
• Identify the difference between functional and code coverage
Functional coverage reports only 50% coverage for this case as one
of the two modes of the project was not tested
low high
3/25/21 Code coverage Functional Coverage 8
Summary
• Explain the different flavors of coverage
• Identify the difference between functional and code coverage
covergroup cg_values_coverage;
VALUES: coverpoint data {
bins low = { [0:127] };
bins high = { [128:255] };
}
endgroup
covergroup cg_state_coverage;
STATES: coverpoint state;
endgroup
covergroup cg10
HUE: coverpoint pixel_hue iff (reset_n. == 1); If the guard expression evaluates to false at a
endgroup; sampling point, then no sample is taken
• Don’t use multiple bins construct for the default bin è bins c[] = default;
• Multiple bins construct would create a separate counter for each individual
value, which could adversely affect simulation
• When a bins definition include an X or Z, the bin count should be only be incremented when the
sampled value has an X or Z in the same bit positions
• wildcard bins turns bits set to X,Z or ? Into don’t care values
• Only 2-state values in the don’t care bit positions are counted; X and Z values are excluded from
the coverage