This is to be taken in context of the second proposal for Mantis 1897. Note that we did agree to re-name "aggregate_by_union" as "merge_instances", but I thought I'd use the name from the current proposal to avoid confusion:
parameter PER_INSTANCE = 0;There are four cases:
parameter AGGREGATE_BY_UNION = 0;
module m;
int i;
covergroup cg;
option.per_instance = PER_INSTANCE;
type_option.aggregate_by_union = AGGREGATE_BY_UNION;
coverpoint i { bins b[] = { [0:2] }; }
endgroup
cg cvA = new;
cg cvB = new;
initial begin
i = 0; cvA.sample();
i = 1; cvA.sample();
i = 2; cvB.sample();
$display("coverage: %.2f; A inst_coverage: %.2f; B inst_coverage: %.2f",
cg::get_coverage(),
cvA.get_inst_coverage(), cvB.get_inst_coverage());
end
endmodule
PER_INSTANCE |
AGGREGATE_BY_UNION |
output |
0 |
0 |
coverage: 50.00; A inst_coverage: 50.00; B inst_coverage: 50.00 |
0 |
1 |
coverage: 100.00; A inst_coverage: 100.00; B inst_coverage: 100.00 |
1 |
0 |
coverage: 50.00; A inst_coverage: 66.67; B inst_coverage: 33.33 |
1 |
1 |
coverage: 100.00; A inst_coverage: 66.67; B
inst_coverage: 33.33 |
This archive was generated by hypermail 2.1.8 : Mon Aug 20 2007 - 16:01:28 PDT