In reply to dave_59:
Hi Dave,
To the above class, I added
task test();
foreach(sv_cg[i]) begin
skew_val_vl[i] = 100*i;
sv_cg[i].sample();
end
endtask
and called it for an instance of the class.
When I run vcover report -details <filename.ucdb>, I get 100% result. I also added “option.per_instance=1” to the covergroup definition. Can you tell me, how do I produce overall numbers to accurately reflect my instance coverage?
COVERGROUP COVERAGE:
Covergroup Metric Goal Status
TYPE /por_pub_routing_checker_pkg/skew_val_cg 100.0% 100 Covered
covered/total bins: 4 4
missing/total bins: 0 4
% Hit: 100.0% 100
Coverpoint skew_val_cg::skew_val_vl 100.0% 100 Covered
covered/total bins: 4 4
missing/total bins: 0 4
% Hit: 100.0% 100
bin skew_range_1 4 1 Covered
bin skew_range_2 4 1 Covered
bin skew_range_3 4 1 Covered
bin skew_range_oor 4 1 Covered
Covergroup instance /por_pub_routing_checker_pkg::my_class::sv_cg#1
25.0% 100 Uncovered
covered/total bins: 1 4
missing/total bins: 3 4
% Hit: 25.0% 100
Coverpoint skew_val_vl 25.0% 100 Uncovered
covered/total bins: 1 4
missing/total bins: 3 4
% Hit: 25.0% 100
bin skew_range_1 1 1 Covered
bin skew_range_2 0 1 ZERO
bin skew_range_3 0 1 ZERO
bin skew_range_oor 0 1 ZERO
…
…
TOTAL COVERGROUP COVERAGE: 100.0% COVERGROUP TYPES: 1