How to hit a cross point of two iff guarded coverpoint

Hi, I have a covergroup which contains two coverpoints and one cross. Unfortunately, The cross point cannot be hit.


covergroup cg_my(string cg_name) @(cov_evt);
  cp_A: coverpoint data iff (addr == 2) {
    bins B0 = { 0 };
    bins B1 = { 1 };
  }
  cp_B: coverpoint data iff (addr == 3) {
    bins APB = { 32'd8 };
    bins AHB = { 32'd9 };
  }
  A_X_B: cross cp_A, cp_B {
    bins B0_APB = binsof(cp_A.B0) && binsof(cp_B.APB);
    bins B1_AHB = binsof(cp_A.B1) && binsof(cp_B.AHB);
  }
endgroup

The “A_X_B” cross point it never hit.

In reply to Xin Jin:

For what value of ‘addr’ would you expect the cross point to be covered? cp_A can only be hit when ‘addr’ is 2, and cp_B can only be hit when ‘addr’ is 3? What would ‘addr’ have to be to hit A_X_B?

In reply to cgales:

Good interview question.

And even without the iff conditions, how could data be 0 and 32’d8 at the same time.