Illegal Bin Hit : The Bin counter for BIN-x is 1

Hi,

I see the below illegal bin hit scenario which I am unable to find the root cause.
Please find the coverage code for the issue.



covergroup example

cp_var_1 : coverpoint var_1
{
  bins value[]       = {[1:4]};
  bins value_5_7     = {[5:7]};
  bins value_8       = {8};
  bins value_9       = {9};
  bins value_10      = {10};
  bins value_11      = {11};
  bins value_12_15   = {[12:15]};
  bins value_16      = {16};
  bins value_[]      = {[17:32]};
}

cp_var_2 : coverpoint var_2
{
  bins value[]       = {[1:4]};
  bins value_5_7     = {[5:7]};
  bins value_8       = {8};
  bins value_9       = {9};
  bins value_10      = {10};
  bins value_11      = {11};
  bins value_12_15   = {[12:15]};
  bins value_16      = {16};
  bins value_[]      = {[17:32]};
}

cp_var_3 : covepoint var_3
{
  bins value[]  = {0,2};
}

cp_var_4 : covepoint var_4
{
  bins value[]  = {0,2};
}

cx_cross_4_coverpoints : cp_var_1, cp_var_2, cp_var_3, cp_var_4
{
  ignore_bins ig1_var_3_x_cp_var_4 = binsof(cp_var_3) intersect{0} && binsof(cp_var_4) intersect {0};
  ignore_bins ig2_var_3_x_cp_var_4 = binsof(cp_var_3) intersect{2} && binsof(cp_var_4) intersect {2};
  ignore_bins ig3_var_3_x_cp_var_4 = binsof(cp_var_3) intersect{0} && binsof(cp_var_4) intersect {2};  
  
  illegal_bins cp1_x_cp2_greater_than_256 = cx_cross_4_coverpoints with (((cp_var_1+1)/2*2) * ((cp_var_2+3)/4*4) > 256);
}

endgroup


I wanted the cross coverpoints to be genrated only for value less than 256[product of cp_var_1 and cp_var_2] and the rest to be illegal.
What I observe is that for “bin value_12_15” of cp_var_1 is hit and “bin value_5_7” of cp_var_2 is hit.
Also their corresponding crosses is covered in the cross coverpoint.
But In the log i see the below error
“Illegal Cross bin was hit. The bin counter for the bin ‘EXAMPLE.cx_cross_4_coverpoints.cp1_x_cp2_greater_than_256’ is 1”

Can someone please help me to understand why I am observing this issue.
Thanks in advance!!

Regards
DoDo_Drx

In reply to DoDo_Drx:

illegal_bins means an error is generated if you hit such a bin. You’re probably covering a value that belongs to those bins (e.g. both variables are 32). If you want to ignore those values, but still want simulating those cases to be legal, then use ignore_bins instead.