quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_green_ball.gif Defining Coverage Points

Vera supports simple to complex syntax to define functional coverage points as listed below.

   

space.gif

  • state
  • m_state
  • tran
  • m_tran
  • cross
   

space.gif

If you do not define any state or transition bins for a coverage point, Vera automatically creates state bins for you. This provides an easy-to-use mechanism for binning different values of a coverage point.

   

space.gif

You can either let Vera automatically create state bins for a coverage point or explicitly define named state and/or transition bins for each of the coverage points. Each named bin groups a set of values (state) or a set of value transitions (trans) associated with a coverage point.

   

space.gif

Lets look at each one of above in details with examples and simulation logs.

   

space.gif

  ../images/main/bulllet_4dots_orange.gif state

state is declared inside the coverage group, and it is used for defining user defined bins.

   

space.gif

Lets assume you have 4 bit sample variable and you want are interested only 0,4,9, for this creating auto bins in not good, but using user define state bins.

   

space.gif

Its always recommended to use user defined bins.

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example
   

space.gif


  1 class coverage_state {
  2   bit [3:0] value;
  3   event     now;
  4 
  5   coverage_group something {
  6      sample_event = sync(ALL,now);
  7      sample value {
  8        state AB_0 (0:7);
  9        state AB_1 (4'b1000);
 10      }
 11   }
 12 
 13   task update_coverage (bit [3:0] value) {
 14      this.value = value;
 15      trigger(now);
 16   }
 17 }
 18 
 19 
 20 
 21 program test {
 22   coverage_state cov = new();
 23   bit [3:0] v; 
 24   repeat (10) {
 25     v = random();
 26     printf("Value is %d\n",v);
 27     cov.update_coverage(v);
 28     delay(1);
 29   }
 30 }    
You could download file coverage_state.vr here
   

space.gif

  ../images/main/bullet_star_pink.gif Simulation log
   

space.gif

 Value is 12
 Value is 13
 Value is 15
 Value is  9
 Value is 13
 Value is 10
 Value is  6
 Value is  3
 Value is 15
 Value is  5
   

space.gif

  ../images/main/bullet_star_pink.gif Coverage Report
   

space.gif

 Group : test::coverage_state::something
 
 ====================================================
 Group : test::coverage_state::something
 ====================================================
 Score   Weight  Goal    
  50.00  1       100     
 
 
 
 
 ====================================================
 
 Samples for Group : test::coverage_state::something
 
 
 
 Variable Expected Covered Percent Goal Weight 
                                               
 Total    2        1       50.00               
                                               
 value    2        1       50.00   100  1      
                                               
 
 
 ====================================================
 
 Summary for variable value
 
 
                   Expected Covered Percent 
                                            
 User Defined Bins 2        1       50.00   
                                            
 
 
 User Defined Bins for value
 
 
 Uncovered bins
 
 name count at least  
                     
 AB_1 0     1        
                     
 
 
 Covered bins
 
 name count at least  
                     
 AB_0 3     1        
                     
 
 
   

space.gif

   

space.gif

   

space.gif

   

space.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

  

Copyright © 1998-2014

Deepak Kumar Tala - All rights reserved

Do you have any Comment? mail me at:deepak@asic-world.com