How to ignore array of bins depends upon datawidth

Hi All,

Size : coverpoint Size{
bins transfer_bytes = {[0:7]};

                 }
NARROW_TRANS_CP : coverpoint current_item.narrow_trans {
                                                      bins TRUE  = {1}; //<data width 
                                                      bins FALSE = {0};//=data_width
                                                      }

sizeXNARROW_TRANS_CP : cross Size,NARROW_TRANS_CP;

Here i need to ignore size & narrow_trans depends on DATA_WIDTH…
for eg :DATA_WIDTH =128 && NARROW_TRANS_CP.FALSE,only Size[4] is valid …need to ignore other sizes…

ignore_bins ignore = (binsof(NARROW_TRANS_CP.FALSE) && !binsof(Size.transfer_bytes) intersect {4}) iff(`MAX_DATA_WIDTH ==128); //here it is working…but i need to ignore for remaining datawidth(8,16,32,64,128,256,512,1024)

issue:
if i add ignore bins under above cross for reaming data widths…
I am getting count of total cross bins =0.
Please ,let me know…is any other method to ignore…
Note: i am using version 10.2 c of questa.

Regards,
Nagendra.

In reply to gani:

Please try to give a more complete example, and show some example values of what you would like covered or ignored.

Size : coverpoint Size{
bins transfer_bytes = {[0:7]};

}
NARROW_TRANS_CP : coverpoint current_item.narrow_trans {
bins TRUE = {1};
sizeXNARROW_TRANS_CP : cross Size,NARROW_TRANS_CP;

Here i need to ignore size & narrow_trans depends on DATA_WIDTH…
for eg :DATA_WIDTH =128 && NARROW_TRANS_CP.FALSE,only Size[4] is valid …need to ignore other sizes…

ignore_bins ignore = (binsof(NARROW_TRANS_CP.FALSE) && !binsof(Size.transfer_bytes) intersect {4}) iff(`MAX_DATA_WIDTH ==128); //here it is working…but i need to ignore for remaining datawidth(8,16,32,64,128,256,512,1024)

issue:
if i add ignore bins under above cross for reaming data widths…
I am getting count of total cross bins =0.
Please ,let me know…is any other method to ignore…
Note: i am using version 10.2 c of questa.

Regards,

That is much more information, but there is still more information that you need to give. You can’t use iff to specify an ignored bin. The iff construct only controls whether a bin is counted or not during a sample.

There might be a better way to write a covergroup if I new exactly what you want counted. For example if you want to make sure that each size is covered for a narrow_trans with a particular data width, you could do.

covergoup bg;
coverpoint Size {
  bins select = {[0:7]} iff ( current_item.narrow_trans && (8 << Size) == DATA_WIDTH )
}
endgroup

In reply to dave_59:

Below are the scenarios ,i want to cover
NARROW_TRANS_CP : coverpoint {TRUE={1}; FALSE={0};}

cross of size X narrow_trans
1)DATA_WIDTH =128 && NARROW_TRANS_CP.FALSE,only Size[7] is valid …need to ignore other sizes(1,2,3,4,5,6,7)
2)DATA_WIDTH =64 && NARROW_TRANS_CP.FALSE,only Size[6] is valid …need to ignore other sizes(1,2,3,4,5,7)

i want to make sure that each size is covered for a narrow_trans(depends on true/false need to ignore some bins) with all data widths(data_width = 64/128/256/512/1024).here i taken two data_widths…
data_width i will pass from cmd line…coverage should be generic for each data_width

3)if NARROW_TRANS_CP.TRUE && if (Data_width ==128) size ={1,2,3,4,5,6} is valid…here i need to ignore 7
4)if NARROW_TRANS_CP.TRUE && if (Data_width ==64) size ={1,2,3,4,5} is valid…here i need to ignore 6,7

can we implement a cross supporting all datawidth w/o using `def guards.

Pls let me know ,how to cover.