Hi all ,
Consider the following snippet ::
covergroup cg;
rw_cp: coverpoint t.rw ;
addr_cp: coverpoint t.addr
{
bins regular[] = { [0:99] }; // creates 100 bins
ignore_bins ignore_addr = { [100:$] };
}
endgroup
[Q1] What is the term used to call regular[] ? Is dynamic bins the correct term
[Q2] bins regular[] = { 0:99]} ; makes 100 bins .
This seems unrelated to auto_bin_max which has default value of 64 .
Using the above syntax ( i.e bin name[] ) is there a limit on the Max Number of bins created ?
Can user control it using any **option** or **type_option** ?
[Q3] Does the LRM dictate how the indexes would be named ? Would it always be start from 0 ? OR does the value on the right decide the starting index .
[Q4] If I were to write alternate ways using with clause ::
// ALTERNATIVE 1
covergroup cg;
rw_cp: coverpoint t.rw ;
addr_cp: coverpoint t.addr
{
bins regular[] = { [0:$] } with ( item inside { [0:99] } ) ; // Works
}
endgroup
// ALTERNATIVE 2
covergroup cg;
rw_cp: coverpoint t.rw ;
addr_cp: coverpoint t.addr
{
bins regular[] = { [$:$] } with ( item inside { [0:99] } ) ; // Works
}
endgroup
// ALTERNATIVE 3
covergroup cg;
rw_cp: coverpoint t.rw ;
addr_cp: coverpoint t.addr
{
bins regular[] = t.addr with ( item inside { [0:99] } ) ; // Doesn't Work Why ??
}
endgroup
**Any suggestions why Aternative3 throws an error ?**
[Q5] Should user ensure that range is ALWAYS low to high ? What if user were to write it reverse
i.e bins regular[] = { [0:$] } with ( item inside { [99:0] } ) ; // Valid ??