Hi All ,
I was referring LRM about possible options to define value and transition bins .
Have a few questions related to it .
LRM Syntax 19-2 defines ::
[ wildcard ] bins_keyword bin_identifier [ [ [ covergroup_expression ] ] ] = { covergroup_range_list } [ with ( with_covergroup_expression ) ][ iff ( expression ) ]
The optional [ [ [ covergroup_expression ] ] ] means that there could be Single bin , Multiple bins OR Fixed bins defined for values .
[Q1] When defining fixed bins the covergroup_expression is required to be an intergal expression right ?
Eg :: bins user_fixed1 [ 5 ] = { ... } ;
bins user_fixed2 [ M / N ] = { ... } ; // M and N are parameters ( i.e elaboration time constants )
[Q2] Would run - time constants ( const ) and static variables be valid as covergroup_expression ?
LRM Syntax 19-3 Specifying bins for transitions defines ::
[ wildcard] bins_keyword bin_identifier [ [ ] ] = trans_list [ iff ( expression ) ]
Unlike Syntax 19-2 , there is No [ [ [ covergroup_expression ] ] ]
This means that only Multiple bins OR a Single bin can be defined for Transitions
Eg :: bins user_fxd1 [ ] = ( [0:3] => 15 ) , ( 0 => 7 ) ; // 5 bins for user_fxd1
bins user_fxd2 = ( 15 => [0:3] ) , ( 7 => 0 ) ; // 1 bin covers 5 transitions .
[Q3] Defining fixed bins for Transition would be Illegal , right ?
Eg :: bins fxd_bin [5] = ( [0:3] => 15 ) , ( 0 => 7 ) ; // Illegal ?
**Regarding Duplicate transitions covered by Multiple bins ::**
bins multi_bin[] = ( [0:3] => 7 ) , ( 1 => 7 ) , ( 3 => 7 ) , ( 5 => 7 ) ;
[Q4] Would there be 4 bins generated ( Merging of duplicate transitions ) OR 4 bins ( No Merging )
LRM has an example that shows that duplicate values are merged for Multiple bins ( using [ ] )
However I couldn’t find an example for duplicate transitions .
Thanks in advance