Reputation: 454
I'm seeing an issue with one of my crosses inheriting the "iff" clause of one of it's constituent coverpoints.
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;
I'm seeing the CrossCancel
is never hitting any bin with LdReqCancel == 1
even when I expect it to, and I suspect it's because the LdOp_cp
is crossed with contains the iff (LdReqVld_d1 && !LdReqCancel)
, so the CrossCancel
"secretly" has that iff
guarding it too. Is this the expected behavior? And if so, how can I prevent this?
Upvotes: 0
Views: 2326
Reputation: 42738
A cross
is technically between bins of a coverpoint
, not the coverpoint itself. From the IEEE 1800-2017 SystemVerilog LRM section 19.6 Defining cross coverage:
Cross coverage of a set of N coverage points is defined as the coverage of all combinations of all bins associated with the N coverage points
So if a coverpoint bin does not get sampled because of an iff
guard, the cross bin is guarded as well.
Upvotes: 3