quick.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

space2.gif

   

space.gif

   

space.gif

  ../images/main/bullet_star_pink.gif User defined cross coverage points

Normally creating auto cross bin results in lot of coverage holes and it could lead to lot of fancy ignore bin syntax. So sometime user define syntax is used. User-defined bins for cross coverage are defined using binsof and intersect. To create a ignore bin on cross one needs to use binsof and intersect.

   

space.gif

   

space.gif

  ../images/main/4blue_dots_bullets.gif Example : User defined cross bins
   

space.gif


  1 module test();
  2 
  3 logic [2:0] addr;
  4 logic [1:0] cmd;
  5 reg ce;
  6 
  7 covergroup address_cov () @ (posedge ce);
  8   ADDRESS : coverpoint addr {
  9     bins addr0 = {0};
 10     bins addr1 = {1};
 11   }
 12   CMD : coverpoint cmd {
 13     bins READ = {0};
 14     bins WRITE = {1};
 15     bins IDLE  = {2};
 16   }
 17   CRS_USER_ADDR_CMD : cross ADDRESS, CMD {
 18     bins USER_ADDR0_READ = binsof(CMD) intersect {0};
 19   }
 20   CRS_AUTO_ADDR_CMD : cross ADDRESS, CMD {
 21     ignore_bins AUTO_ADDR_READ = binsof(CMD) intersect {0};
 22     ignore_bins AUTO_ADDR_WRITE = binsof(CMD) intersect {1} && binsof(ADDRESS) intersect{0};
 23   }
 24 
 25 endgroup
 26 
 27 address_cov my_cov = new();
 28 
 29 initial begin
 30   ce   <= 0;
 31   $monitor("ce %b addr 8'h%x cmd %x",ce,addr,cmd);
 32   repeat (10) begin
 33     ce <= 1;
 34     addr <= $urandom_range(0,5);
 35     cmd  <= $urandom_range(0,2);
 36      #10 ;
 37     ce <= 0;
 38      #10 ;
 39   end
 40 end
 41 
 42 endmodule
You could download file user_cross_bin.sv here
   

space.gif

  ../images/main/4blue_dots_bullets.gif Simulation : User defined cross bins
   

space.gif

 ce 1 addr 8'h2 cmd 2
 ce 0 addr 8'h2 cmd 2
 ce 1 addr 8'h1 cmd 0
 ce 0 addr 8'h1 cmd 0
 ce 1 addr 8'h1 cmd 2
 ce 0 addr 8'h1 cmd 2
 ce 1 addr 8'h4 cmd 0
 ce 0 addr 8'h4 cmd 0
 ce 1 addr 8'h0 cmd 2
 ce 0 addr 8'h0 cmd 2
 ce 1 addr 8'h5 cmd 2
 ce 0 addr 8'h5 cmd 2
 ce 1 addr 8'h2 cmd 2
 ce 0 addr 8'h2 cmd 2
 ce 1 addr 8'h5 cmd 0
 ce 0 addr 8'h5 cmd 0
 ce 1 addr 8'h2 cmd 2
 ce 0 addr 8'h2 cmd 2
 ce 1 addr 8'h4 cmd 2
 ce 0 addr 8'h4 cmd 2
   

space.gif

  ../images/main/4blue_dots_bullets.gif Report : User defined cross bins
   

space.gif

 ===============================================================================
 Group : test::address_cov
 ===============================================================================
 SCORE  WEIGHT GOAL   
  73.33 1      100    
 -------------------------------------------------------------------------------
 Summary for Group   test::address_cov
 
 CATEGORY  EXPECTED UNCOVERED COVERED PERCENT 
 Variables 5        1         4       83.33   
 Crosses   8        3         5       63.33   
 
 Variables for Group  test::address_cov
 
 VARIABLE EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT 
 ADDRESS  2        0         2       100.00  100  1      
 CMD      3        1         2       66.67   100  1      
 
 Crosses for Group  test::address_cov
 
 CROSS             EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT 
 CRS_USER_ADDR_CMD 5        2         3       60.00   100  1      
 CRS_AUTO_ADDR_CMD 3        1         2       66.67   100  1      
 -------------------------------------------------------------------------------
 Summary for Variable ADDRESS
 
 CATEGORY          EXPECTED UNCOVERED COVERED PERCENT 
 User Defined Bins 2        0         2       100.00  
 
 User Defined Bins for ADDRESS
 
 Bins
 
 NAME  COUNT AT LEAST  
 addr1 2     1        
 addr0 1     1        
 -------------------------------------------------------------------------------
 Summary for Variable CMD
 
 CATEGORY          EXPECTED UNCOVERED COVERED PERCENT 
 User Defined Bins 3        1         2       66.67   
 
 User Defined Bins for CMD
 
 Uncovered bins
 
 NAME  COUNT AT LEAST NUMBER 
 WRITE 0     1        1      
 
 Covered bins
 
 NAME COUNT AT LEAST  
 IDLE 7     1        
 READ 3     1        
 -------------------------------------------------------------------------------
 Summary for Cross CRS_USER_ADDR_CMD
 
 Samples crossed: ADDRESS CMD
 CATEGORY                           EXPECTED UNCOVERED COVERED PERCENT MISSING 
 TOTAL                              5        2         3       60.00   2       
 Automatically Generated Cross Bins 4        2         2       50.00   2       
 User Defined Cross Bins            1        0         1       100.00          
 
 Automatically Generated Cross Bins for CRS_USER_ADDR_CMD
 
 Element holes
 ADDRESS CMD     COUNT AT LEAST NUMBER 
 *       [WRITE] --    --       2      
 
 Covered bins
 
 ADDRESS CMD  COUNT AT LEAST  
 addr1   IDLE 1     1        
 addr0   IDLE 1     1        
 
 User Defined Cross Bins for CRS_USER_ADDR_CMD
 
 Bins
 
 NAME            COUNT AT LEAST  
 USER_ADDR0_READ 1     1        
 -------------------------------------------------------------------------------
 Summary for Cross CRS_AUTO_ADDR_CMD
 
 Samples crossed: ADDRESS CMD
 CATEGORY                           EXPECTED UNCOVERED COVERED PERCENT MISSING 
 TOTAL                              3        1         2       66.67   1       
 Automatically Generated Cross Bins 3        1         2       66.67   1       
 User Defined Cross Bins            0        0         0                       
 
 Automatically Generated Cross Bins for CRS_AUTO_ADDR_CMD
 
 Uncovered bins
 
 ADDRESS CMD     COUNT AT LEAST NUMBER 
 [addr1] [WRITE] 0     1        1      
 
 Covered bins
 
 ADDRESS CMD  COUNT AT LEAST  
 addr1   IDLE 1     1        
 addr0   IDLE 1     1        
 
 User Defined Cross Bins for CRS_AUTO_ADDR_CMD
 
 Excluded/Illegal bins
 
 NAME            COUNT           
 AUTO_ADDR_READ  0     Excluded 
 AUTO_ADDR_WRITE 0     Excluded 
   

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