Ignoring coverbins depends upon condition

Hi All,

Please suggest me ,how we can achieve below coverage scenario.

I have coverpoint SIZE,bins are varying depends upon DATA_WIDTH…
if (DATA_WIDTH==64) only 4 bins(bins SIZE_1_BYTE = {3’b000}; bins SIZE_2_BYTES = {3’b001}; bins SIZE_4_BYTES = {3’b010};bins SIZE_8_BYTES = {3’b011};)

If(DATA_WIDTH==128) ,5 bins need to cover…SIZES(1B,2B,4B,8B,16B)…
I have coded using define guards…please check below coverpoint… or else we can code different coverpoint for each DATA_WIDTH…but if i run for data width 64(bins 1B,2B,4B,8B}…got hit…reaming coverpoint will not…covergae will reduce …

 BURST_SIZE_CP: coverpoint current_write_item.Size  {
                                                     
                                                      bins SIZE_1_BYTE    =  {3'b000};  
                                                      bins SIZE_2_BYTES   =  {3'b001};  
                                                      bins SIZE_4_BYTES   =  {3'b010}; 
                                                      bins SIZE_8_BYTES   =  {3'b011};
                                                      `ifndef MAX_DATA_WIDTH_64 
                                                      bins SIZE_16_BYTES  =  {3'b100};  
                                                      `ifndef MAX_DATA_WIDTH_128 
                                                      bins SIZE_32_BYTES  =  {3'b101};
                                                      `ifndef MAX_DATA_WIDTH_256 
                                                      bins SIZE_64_BYTES  =  {3'b110}; 
                                                      `ifndef MAX_DATA_WIDTH_512 
                                                      bins SIZE_128_BYTES =  {3'b111};   
                                                     `endif
                                                     `endif
                                                     `endif
                                                     `endif
                                                   }

Please suggest me is there any other way to cover this scenario…

Thanks,
Nagendra,

I would recommend coding your coverpoint for all DATA_WIDTH possibilities. This makes coverage collection constant across all simulations to allow for merging if required. I would then create a testplan which filters the coverage metrics to match what your requirements are and calculate overall coverage correctly.