Coverpoint cross syntax

Hi,
I want to create CROSS between two bins of differet coverpoints: zero CROSS two.
right now i do this by checking each register for correct value and i mark “hit” if the statement is true.

But, i want to ask only about specific bins. can i somehow check the statement w.o passing throught the registers?

Current Code (inside covergroup):
CHECK1 : coverpoint cfg.source_one.reg.value
{ bins zero = {0};
bins one = {1}; }
CHECK2 : coverpoint cfg.source_two.reg.value
{ bins two = {0};
bins three = {1}; }
CHECK1_CROSS_CHECK2: coverpoint cfg.source_one.reg.value == 0 && cfg.source_two.reg.value == 0
{ bins hit = {1} ; }

I want it to look like:
CHECK1 : coverpoint cfg.source_one.reg.value
{ bins zero = {0};
bins one = {1}; }
CHECK2 : coverpoint cfg.source_two.reg.value
{ bins two = {0};
bins three = {1}; }
CHECK1_CROSS_CHECK2: coverpoint zero && two
{ bins hit = {1} ; }

Can it be done with similar syntax?

In reply to oglick:

“You can have a look at the LRM section 19.6.1 Defining cross coverage bins
User-defined cross bins and automatically generated bins can coexist in the same cross. Automatically generated bins are retained for those cross products that do not intersect cross products specified by any user-defined cross bin.”

Because of this you need to exclude the crossed bins you are not interested, with the ignore_bins keyword, for this you have some options for example:


   CHECK1_x_CHECK2: cross CHECK1, CHECK2 {
      bins hit =  binsof(CHECK1) intersect {0} && binsof(CHECK2) intersect {0};
      //bins hit = CHECK1_x_CHECK2 with (CHECK1 == 0 && CHECK2 == 0);

      //OPTION 1 with binsof operator
      //ignore_bins not_hit = !binsof(CHECK1) intersect {0} || !binsof(CHECK2) intersect {0};
      //OPTION 2 using the with clause
      ignore_bins not_hit = CHECK1_x_CHECK2 with (CHECK1 != 0 || CHECK2 != 0);
    }

HTH,

-R