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 state with if

User defined state bins also support of usage of conditional check before state is considered to be covered. The condition can be any vera legal condition.

   

space.gif

"if" condition can be used with state, tran, ignored cross.

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif Example
   

space.gif


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

space.gif

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

space.gif

 Value is 12 Enable 13
 Value is 15 Enable 9
 Value is 13 Enable 10
 Value is 6 Enable 3
 Value is 15 Enable 5
 Value is 2 Enable 7
 Value is 1 Enable 10
 Value is 14 Enable 4
 Value is 4 Enable 11
 Value is 6 Enable 10
   

space.gif

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

space.gif

 Group : test::coverage_state_condition::something
 
 ====================================================
 Group : test::coverage_state_condition::something
 ====================================================
 Score   Weight  Goal    
  50.00  1       100     
 
 
 
 
 ====================================================
 
 Samples for Group : test::coverage_state_condition::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 4     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