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 Transition bins creation : Range of repetition

Sometime it is required to cover atleat one of the these repetition of values in transition bins are hit. We can manually specify them, but then Systemverilog provides the synax to write this.

   

space.gif

WRITE=>WRITE or

WRITE=>WRITE=>WRITE or

WRITE=>WRITE=>WRITE=>WRITE or

WRITE=>WRITE=>WRITE=>WRITE=>WRITE

   

space.gif

   

space.gif

  ../images/main/4blue_dots_bullets.gif Example : Range of repetition creation
   

space.gif


  1 module test();
  2 
  3 logic [2:0] addr;
  4 reg ce;
  5 
  6 covergroup address_cov () @ (posedge ce);
  7   ADDRESS : coverpoint addr {
  8     bins adr0[]          = (0[*1:4]);
  9     bins adr1[]          = (1[*1:2]);
 10   }
 11 endgroup
 12 
 13 address_cov my_cov = new();
 14 
 15 initial begin
 16   ce   <= 0;
 17   $monitor("ce %b addr 8'h%x",ce,addr);
 18   repeat (10) begin
 19     ce <= 1;
 20     addr <= $urandom_range(0,1);
 21      #10 ;
 22     ce <= 0;
 23      #10 ;
 24   end
 25 end
 26 
 27 endmodule
You could download file range_repetition_bin.sv here
   

space.gif

  ../images/main/4blue_dots_bullets.gif Simulation : Range of repetition creation
   

space.gif

 ce 1 addr 8'h0
 ce 0 addr 8'h0
 ce 1 addr 8'h0
 ce 0 addr 8'h0
 ce 1 addr 8'h1
 ce 0 addr 8'h1
 ce 1 addr 8'h0
 ce 0 addr 8'h0
 ce 1 addr 8'h1
 ce 0 addr 8'h1
 ce 1 addr 8'h1
 ce 0 addr 8'h1
 ce 1 addr 8'h0
 ce 0 addr 8'h0
 ce 1 addr 8'h1
 ce 0 addr 8'h1
 ce 1 addr 8'h0
 ce 0 addr 8'h0
 ce 1 addr 8'h1
 ce 0 addr 8'h1
   

space.gif

  ../images/main/4blue_dots_bullets.gif Report : Range of repetition creation
   

space.gif

 =====================================================================
 Group : test::address_cov
 =====================================================================
 SCORE  WEIGHT GOAL   
 100.00 1      100    
 ---------------------------------------------------------------------
 Summary for Group   test::address_cov
 
 CATEGORY  EXPECTED UNCOVERED COVERED PERCENT 
 Variables 2        0         2       100.00  
 
 Variables for Group  test::address_cov
 
 VARIABLE EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT 
 ADDRESS  2        0         2       100.00  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  
 adr1:1[*[1:2]] 5     1        
 adr0:0[*[1:4]] 5     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