|
|
|

|
|
|
|
|
|

|
|
 |
Transition bins creation : Consecutive repetion
|
|
|
Sometime it is required to check if same values repeated N number of time. This can be done by manually typing the value N times as in below. |
|
|

|
|
|
WRITE=>WRITE=>WRITE=>WRITE |
|
|

|
|
|
It works, but the problem is if you have to measure long sequence, then it is time waste. Systemverilog provides syntax to do it. |
|
|

|
|
|
4[*WRITE] |
|
|

|
|
|
|
|
|

|
|
 |
Example : Consecutive repetions creation
|
|
|

|
|
|
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_2times = (0[*2]);
9 bins adr_1_3times = (1[*3]);
10 bins adr_2_4times = (2[*4]);
11 }
12 endgroup
13
14 address_cov my_cov = new();
15
16 initial begin
17 ce <= 0;
18 addr <= 2;
19 $monitor("ce %b addr 8'h%x",ce,addr);
20 repeat (10) begin
21 ce <= 1;
22 #10 ;
23 ce <= 0;
24 #10 ;
25 end
26 end
27
28 endmodule
You could download file cons_repetion_bin.sv here
|
|
|

|
|
 |
Simulation : Consecutive repetions creation
|
|
|

|
|
|
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
ce 1 addr 8'h2
ce 0 addr 8'h2
|
|
|

|
|
 |
Report : Consecutive repetions creation
|
|
|

|
|
|
===========================================================
Group : test::address_cov
===========================================================
SCORE WEIGHT GOAL
33.33 1 100
-----------------------------------------------------------
Summary for Group test::address_cov
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
Variables 3 2 1 33.33
Variables for Group test::address_cov
VARIABLE EXPECTED UNCOVERED COVERED PERCENT GOAL WEIGHT
ADDRESS 3 2 1 33.33 100 1
-----------------------------------------------------------
Summary for Variable ADDRESS
CATEGORY EXPECTED UNCOVERED COVERED PERCENT
User Defined Bins 3 2 1 33.33
User Defined Bins for ADDRESS
Uncovered bins
NAME COUNT AT LEAST NUMBER
adr_1_3times 0 1 1
adr_0_2times 0 1 1
Covered bins
NAME COUNT AT LEAST
adr_2_4times 7 1
|
|
|

|
|
|

|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

|
|
Copyright © 1998-2025 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|