I am working with already generated coverpoints
and covergroups
. I have a way to access all the coverpoints
in the covergroup
through an `include
file, but cannot edit the coverpoints
directly.
covergroup cg_FOO;
apple: coverpoint Atype_e'(sample.apple.value);
kiwi: coverpoint Ktype_e'(sample.kiwi.vale);
`ifdef MY_COV
`include "cg_FOO.svh"
`endif
end group: cg_FOO
cg_FOO.svh is an example for this covergroup
, but with another generated covergroup
I have a separate associated file. I define all sorts of cross
es and non-generated coverpoints
in these `include
d files. However, I also want to specify certain enum values for coverpoints
apple
and kiwi
that may not be valid for cg_FOO
.
If I was able to change each coverpoint, I would just do the following:
apple: coverpoint Atype_e'(sample.value) {
ignore_bins ignore_FUJI = apple with (FUJI);
}
But, including a separate file into each coverpoint
of each covergroup
is messy and not feasible.
Everything I have found thus far makes it seem like I need to specify an ignore_bin
inside a coverpoint
structure. How could I ignore certain bins of a coverpoint
from within my cg_FOO.svh file (ie in the covergroup
, but not changing all the generated coverpoints
)?
Note, I also have 2 other `include
files to work with, one outside the covergroups
but inside the class that contains them (I am using this file for macro, variable, and function definitions), and another file to define helping logic just before the covergroup
s get sampled (ie when sample
gets defined).
You're out of luck unless the tool you are using gives you an API to access and modify the coverage database. Bins are very difficult to access because they have no easy names to reference them, you have to scan through them. It's very easy to exclude coverpoints externally by setting their weights to 0.
Without knowing exactly what your coverage model looks like, it's hard to give you a better answer.