Coverage analyze automatically?

Hi all !
I have a question that if we can make the UVM environment to analyze coverage automatically, it means that the tool or environment can analyze why uncovered bins are not hit, then, they can modify corresponding testcases’s configurations to hit these uncovered bins.

In reply to Luong Thanh An:

Hi,
As far as I know testcases are written by individuals depending upon the requirement of verification. UVM can create its own bins if we don’t declare it manually but it is not possible or not needed to cover certain set of values for certain purposes. So bins , covergroups, coverage all depends upon the individual who writes the test case. UVM cant alter or modify test case as it does not know our requirement.

In reply to Luong Thanh An:

It’s possible.

[1] Clean relation between the constraints and coverage has to established
[2] Constraints should be written such that they are easy to bias

  • For example instead of saying
    constraint { operand1 inside {0,5};}
    You might want to say
    constraint { operand1 inside operand_value_queue;}

operand_value_queue could be initially updated with the 0 to 5 values

[3] In your UVM test you can check the coverage hit by doing:
percentage_coverage = covergroup.get_inst_coverage(covered_bins, total_bins);

Now this API doesn’t tell which bins are hit. So let’s say you create a covergroup per bin.
cg_0 for value 0, cg_1 for value_1 so on

Now whichever is hit you can remove it from the queue before randomizing the operands.

[4] I am showing one simple example but complex problems can also be thought out on similar lines

Bottomline: Clean connection between coverage and randomization, ability to bias the constraints needs to be planned out.