quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bulllet_4dots_orange.gif cross bad state binsof

This is prefered syntax for defining bad state in cross. It uses combination of binsof and intersect to define a bad state.

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example
   

space.gif


  1 class coverage_cross_bad_state {
  2   bit [1:0] value1;
  3   bit [1:0] value2;
  4   event     now;
  5 
  6   coverage_group something {
  7      sample_event = sync(ALL,now);
  8      sample value1 {
  9        state S0 (0);
 10        state S1 (1);
 11        state S2 (2);
 12        state S3 (3);
 13      }
 14      sample value2 {
 15        state M0 (0);
 16        state M1 (1);
 17        state M2 (2);
 18        state M3 (3);
 19      }
 20      cross MY_CROSS (value1,value2) {
 21        coverage_goal      = 100;
 22        cov_weight =  20;
 23        cross_auto_bin_max = 20; 
 24        bad_state MY_CROSS_BAD (
 25          (binsof(value1) intersect {
 26             0,
 27             1}
 28          ) && 
 29          (binsof(value2) intersect {
 30             0:2 }
 31          )
 32        );
 33 
 34      }
 35   }
 36 
 37   task update_coverage (bit [1:0] value1,bit [1:0] value2) {
 38      this.value1 = value1;
 39      this.value2 = value2;
 40      trigger(now);
 41   }
 42 }
 43 
 44 
 45 
 46 program test {
 47   coverage_cross_bad_state cov = new();
 48   bit [1:0] v1; 
 49   bit [1:0] v2; 
 50   repeat (10) {
 51     v1 = random();
 52     v2 = random();
 53     printf("Value is %0d %0d\n",v1,v2);
 54     cov.update_coverage(v1,v2);
 55     delay(1);
 56   }
 57 }    
You could download file coverage_cross_bad_state_binsof.vr here
   

space.gif

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

space.gif

 Value is 0 1
 VERIFICATION ERROR (VERA FUNCTIONAL COVERAGE): 
 Illegal Cross State = coverage_cross_bad_state::
 something:cov.MY_CROSS.MY_CROSS_BAD
  ( coverage_cross_bad_state_binsof.vr, line 20 )
   

space.gif

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

space.gif

 Group : test::coverage_cross_bad_state::something
 
 ====================================================
 Group : test::coverage_cross_bad_state::something
 ====================================================
 Score   Weight  Goal    
   2.27  1       100     
 
 
 
 
 ====================================================
 
 Samples for Group : test::coverage_cross_bad_state::something
 
 
 
 Variable Expected Covered Percent Goal Weight 
                                               
 Total    8        2       25.00               
                                               
 value1   4        1       25.00   100  1      
                                               
 value2   4        1       25.00   100  1      
                                               
 
 
 Crosses for Group : test::coverage_cross_bad_state::something
 
 
 
 Cross    Expected Covered Percent Goal Weight 
                                               
 Total    10       0       0.00                
                                               
 MY_CROSS 10       0       0.00    100  20     
                                               
 
 
 ====================================================
 
 Summary for variable value1
 
 
                   Expected Covered Percent 
                                            
 User Defined Bins 4        1       25.00   
                                            
 
 
 User Defined Bins for value1
 
 
 Uncovered bins
 
 name count at least  
                     
 S3   0     1        
                     
 S2   0     1        
                     
 S1   0     1        
                     
 
 
 Covered bins
 
 name count at least  
                     
 S0   1     1        
                     
 
 
 ====================================================
 
 Summary for variable value2
 
 
                   Expected Covered Percent 
                                            
 User Defined Bins 4        1       25.00   
                                            
 
 
 User Defined Bins for value2
 
 
 Uncovered bins
 
 name count at least  
                     
 M3   0     1        
                     
 M2   0     1        
                     
 M0   0     1        
                     
 
 
 Covered bins
 
 name count at least  
                     
 M1   1     1        
                     
 
 
 ====================================================
 
 Summary for cross MY_CROSS
 
 
 Samples crossed: value1 value2
                                    Expected Covered Percent Missing 
                                                                     
 Total                              10       0       0.00    10      
                                                                     
 Automatically Generated Cross Bins 10       0       0.00    10      
                                                                     
 User Defined Cross Bins            0        0                       
                                                                     
 
 
 Automatically Generated Cross Bins for MY_CROSS
 
 
 Uncovered bins
 
 value1    value2              count at least          
                                                       
 [S3 , S2] [M3 , M2 , M1 , M0] --    --       (8 bins) 
                                                       
 [S1 , S0] [M3]                --    --       (2 bins) 
                                                       
 
 
 
 User Defined Cross Bins for MY_CROSS
 
 
 Excluded/Illegal bins
 
 name         count          
                            
 MY_CROSS_BAD 0     illegal 
   

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