|
|
|
|
|
|
|
|
|
|
|
|
Transition bins creation : repetition with nonconsecutive
|
|
|
The repetition with nonconsecutive occurrence of a value is specified using: trans_item [-> repeat_range ]. Here, the occurrence of a value is specified with an arbitrary number of sample points where the value does not occur. |
|
|
|
|
|
2[->WRITE] |
|
|
|
|
|
This is expanded as |
|
|
|
|
|
......=>WRITE.......=>WRITE |
|
|
|
|
|
Here dots can be any other transition which does not contain command WRITE like IDLE, READ etc |
|
|
|
|
|
We can mix repetition with nonconsecutive with other transition types to create complex transition patterns. Below example shows one. |
|
|
|
|
|
|
|
|
|
|
|
Example : repetition with nonconsecutive
|
|
|
|
|
|
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 adr = (0=>2[->2]=>1);
9 }
10 endgroup
11
12 address_cov my_cov = new();
13
14 initial begin
15 ce <= 0;
16 $monitor("ce %b addr 8'h%x",ce,addr);
17 repeat (10) begin
18 ce <= 1;
19 addr <= $urandom_range(0,2);
20 #10 ;
21 ce <= 0;
22 #10 ;
23 end
24 end
25
26 endmodule
You could download file noncon_repetition_bin.sv here
|
|
|
|
|
|
|
|
|
Simulation : repetition with nonconsecutive
|
|
|
|
|
|
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
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'h2
ce 0 addr 8'h2
ce 1 addr 8'h1
ce 0 addr 8'h1
ce 1 addr 8'h0
ce 0 addr 8'h0
ce 1 addr 8'h0
ce 0 addr 8'h0
ce 1 addr 8'h2
ce 0 addr 8'h2
|
|
|
|
|
|
Report : repetition with nonconsecutive
|
|
|
|
|
|
===========================================================
Group : test::address_cov
===========================================================
SCORE WEIGHT GOAL
0.00 1 100
-----------------------------------------------------------
Summary for Group test::address_cov
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
Variables 1 1 0 0.00
Variables for Group test::address_cov
VARIABLE EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT
ADDRESS 1 1 0 0.00 100 1
-------------------------------------------------------------------------------
Summary for Variable ADDRESS
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
User Defined Bins 1 1 0 0.00
User Defined Bins for ADDRESS
Uncovered bins
NAME COUNT AT LEAST NUMBER
adr 0 1 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|