Is there a way to reset a coverpoint counter (or reset all the coverpoint) while the test is running, from the test code.
Is there a way to get the coverpoint hits while the test is running, from the test code. I know systemverilog doesn’t give handles to coverpoints, i was just wondering if there is an another way.
There’s no way to reset the bins of a coverpoint, and no way to get a hit count directly.
Covergroups are meant for passive use, so you should explain more what you are trying to accomplish.
I want to use coverage as feedback for my costraint random test. But i didnt want to check only the instance coverage. Is there an another way to get the hit count?
If you have a handle to a covergroup(cg_h), you can get the coverage data for a coverpoint (cp) using cg_h.cp.get_coverage(). See section 19.8 of the 1800-2017 LRM.