Difference between coverage bins a[4] & a[ ]?

Hi,
I am trying to understand the difference between the below cover-point bins


coverage cg;
   cp1 : coverpoint { bins a[4] = {[1:10],11,13,15};}
   cp2 : coverpoint { bins a[ ] = {[1:10],11,13,15};}

what I know is here for both cp1 and cp2 , 4-cover bins are created, I have confused about how these values are spread out among 4 bins ?
And Is they are any method like a display statement to check bins it created for our coverpoint during simulation?

Please help me with this…

Thanks & Regards
Sunodh

In reply to SUNODH:

SystemVerilog-2017 LRM Section 19.5.1 explains the value distribution

For fixed bins the 13 values are distributed within 4 bins as :: <1,2,3>, <4,5,6>, <7,8,9>, <10,11,13,15>

For the 2nd case 13 bins are generated , 1 bin for each value from 1:10 , 11 , 13 , 15 .

Is they are any method like a display statement to check bins it created for our coverpoint during simulation?

As per my understanding one would have to generate coverage report ( html or text format ) to observe the bins generated .

In reply to MICRO_91:

Thank you for answering
So my understanding is for fixed bins we need to calculate
no.values/bins then round of value and according to that evenly distribute bins
is below bins distribution is correct


bins a[5] = {[1:10],11,13,15} :: <1,2,3>,<4,5,6>,<7,8,9>,<10,11,13>,<15>
bins a[6] = {[1:10],11,13,15} :: <1,2>,<3,4>,<5,6>,<7,8>,<9,10>,<11,13,15>

Please correct me if i wrong

Thanks

In reply to SUNODH:

That’s partially correct . There is no rounding off , only integer part is considered .


 bins a1[5] = {[1:10],11,13,15};
 bins a2[6] = {[1:10],11,13,15};

a1 has 5 bins divided amongst 13 values .

( 13 / 5 ) == 2 ( integer part only ) .

So each bin will cover 2 values except the last bin which would simply cover the remaining values


 bins a1[5] = {[1:10],11,13,15} :: <1,2>,<3,4>,<5,6>,<7,8>,<9,10,11,13,15>

Will leave a2 for you to try

In reply to MICRO_91:

Hi

Thank for clearing it
for a[6] it will be 13/6 == 2
so for 6 bins we have 2 values each


bins a[6] = {[1:10],11,13,15} :: <1,2>,<3,4>,<5,6>,<7,8>,<9,10>,<11,13,15>

Thanks

In reply to SUNODH:

so for 6 bins we have 2 values each

Correction : Last bin has 3 values whereas remaining bins cover 2 values each