I am trying to display coverage (in terms of percentage) for a specific bin within a coverpoint
. I am able to display the coverage percentage of a coverpoint
but not the coverage percentage for individual bins within the coverpoint
.
covergroup cov_a @(posedge clk);
c1:coverpoint signal{
bins a={1};
bins b={0};
}
c2:coverpoint b{
bins c={1};
bins d={0};
}
option.per_instance = 1;
endgroup :cov_a
cov_a cov_a_inst = new();
final begin
$display("Coverage for c1: %d%%", cov_a_inst.c1.get_inst_coverage());
$display("Coverage for c2: %d%%", cov_a_inst.c2.get_inst_coverage());
end
I want to do the below
//$display("Coverage for bin a in c1 coverpoint: %d", $coverage(cov_a_inst.c1.a));
not sure how to give the hierarchy.
Note: I have tried adding a single bin within a coverpoint
which also solves the issue, but I want to optimize this.