1. 和bins overlap
coverpoint p {
bins exp[] = {[1:100]};
ignore_bins ign = {23,45,67};
}
2. 使用with (和array 相关task类似)
covergroup cover_me;
x_cp : coverpoint x;
y_cp : coverpoint y;
x_y_cross: cross x_cp, y_cp {
ignore_bins ignore_x_values_higher_than_y = x_y_cross with (x_cp > y_cp);
}
endgroup
a: coverpoint x
{
bins mod3[] = {[0:255]} with (item % 3 == 0);
}
//This bin definition selects all values from 0 to 255 that are evenly divisible by 3.
coverpoint b
{
bins func[] = b with (myfunc(item));
}
//use of the coverpoint name b to denote that the with_covergroup_expression will be applied to all
values of the coverpoint
if a coverpoint bin does not get sampled because of an iff
guard, the cross bin is guarded as well.
covergroup cg @(LdReqVld_d1);
LdReq_cp : coverpoint LdReqVld_d1 iff (!LdReqCancel);
LdOp_cp : coverpoint LdReqOp_d1 iff (LdReqVld_d1 && !LdReqCancel);
LdCancel_cp : coverpoint LdReqCancel;
CrossCancel : cross LdOp_cp, LdCancel_cp;
seeing the CrossCancel
is never hitting any bin with LdReqCancel == 1