Defining Value and Transition bins

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

In reply to MICRO_91:

  1. The count of bins must be a positive integral number
  2. The covergroup_expression for bin construction gets “sampled” at the time of covergroup’s construction. It does not matter if the expression is a constant or variable.
  3. The syntax in the BNF does not allow specifying a fixed number of transition bins.
  4. 7 bins get created. Coverpoint bins never get merged. You might get a warning of there are overlaps.

In reply to dave_59:

Dave ,

Regarding the duplicate transitions

Coverpoint bins never get merged

Could you help me with the LRM section which discusses this ?

I understand that we don’t discuss tools here but I see different output on different tools ( some merge others don’t ) . I was of the opinion that maybe LRM isn’t clear on overlapping / duplicate transitions , so tools have chosen their own implementation .

Thanks in Advance

In reply to MICRO_91:

I can’t point you to an LRM section about merging bins because it doesn’t exist. Only margining or overlapping between different instances of the same covergroup type in the LRM.