System Verilog Covergroups

Hi,

I am a little bit confused between “Ignore Bins” and “Illegal Bins”. Both of them serve the same purpose but only in the case of Illegeal Bins, the simulations is halted if that particular bin is hit.

Am I correct, or there is more to this?

Please let me know.

In reply to Akhil Mehta:

Simulation isn’t halted when an illegal_bin is hit . We may have multiple errors from illegal_bins being hit during a simulation .

In reply to Akhil Mehta:

They both have similar functionality, but very different purposes.

Both exclude values from existing implicit or explicit bin specifications and can be used for debugging purposes.

Sometimes it’s easier to create a broad value bin range and then explicitly exclude specific values from coverage versus trying to create many disjoint ranges (e.g. 1-20 except 6 and 12, versus 1-5, 7-11, 13-20).

Hitting an illegal bin is something that should never happen in a testbench and generates an error. Whether it stops the simulation or not is a tool specific implementation. In any case hitting an illegal bin should throw out all of the coverage collected for that test.

In reply to dave_59:

Hi Dave ,

I was trying the following code ::


 bit [3:0]  adr1 ;

   covergroup adr1_cg ;  
   
      ac : coverpoint adr1    
      {   
        illegal_bins  illvalues  =  { [12:15] }  ;   
      }   
    
   endgroup                      
 
   adr1_gc  cg1  =  new() ;

   initial  begin

     #2 ; adr1 = 10 ;  cg1.sample() ;
    
     #2 ; adr1 = 8  ;  cg1.sample() ;

     #2 ; adr1 = 14 ;  cg1.sample() ;
        
     #2 ; adr1 = 4  ;  cg1.sample() ;
    
   end 


In any case hitting an illegal bin should throw out all of the coverage collected for that test.

I checked that the LRM doesn’t mention anything regarding this .

On trying the above code I see that tools have different behavior ,
some consider auto[4] covered ( Value after illegal_bin hit ) whereas some don’t

So I assume this would also fall under Tool Specific behavior ( which I understand isn’t discussed on this forum )

In reply to hisingh:

The LRM says

All values or transitions associated with illegal bins are excluded from coverage.