|
|
|
|
|
|
|
|
|
|
|
|
cross ignored
|
|
|
Cross ignored is used for ignoring some to the cross states or transitions. This is old feature and should not be used. |
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
1 class coverage_cross_ignored {
2 bit [1:0] value1;
3 bit [1:0] value2;
4 event now;
5
6 coverage_group something {
7 sample_event = sync(ALL,now);
8 sample value1 {
9 state S0 (0);
10 state S1 (1);
11 state S2 (2);
12 state S3 (3);
13 }
14 sample value2 {
15 state M0 (0);
16 state M1 (1);
17 state M2 (2);
18 state M3 (3);
19 }
20 cross MY_CROSS (value1,value2) {
21 coverage_goal = 100;
22 cov_weight = 20;
23 cross_auto_bin_max = 20;
24 ignored MY_CROSS_IGNORED (
25 value1 == 0 && value2 == 0
26 );
27
28 }
29 }
30
31 task update_coverage (bit [1:0] value1,bit [1:0] value2) {
32 this.value1 = value1;
33 this.value2 = value2;
34 trigger(now);
35 }
36 }
37
38
39
40 program test {
41 coverage_cross_ignored cov = new();
42 bit [1:0] v1;
43 bit [1:0] v2;
44 repeat (10) {
45 v1 = random();
46 v2 = random();
47 printf("Value is %0d %0d\n",v1,v2);
48 cov.update_coverage(v1,v2);
49 delay(1);
50 }
51 v1 = 0;
52 v2 = 0;
53 printf("Value is %0d %0d\n",v1,v2);
54 cov.update_coverage(v1,v2);
55 delay(1);
56 }
You could download file coverage_cross_ignored.vr here
|
|
|
|
|
|
Simulation log
|
|
|
|
|
|
Value is 0 1
Value is 3 1
Value is 1 2
Value is 2 3
Value is 3 1
Value is 2 3
Value is 1 2
Value is 2 0
Value is 0 3
Value is 2 2
Value is 0 0
|
|
|
|
|
|
Coverage Report
|
|
|
|
|
|
Group : test::coverage_cross_ignored::something
====================================================
Group : test::coverage_cross_ignored::something
====================================================
Score Weight Goal
51.51 1 100
====================================================
Samples for Group : test::coverage_cross_ignored::something
Variable Expected Covered Percent Goal Weight
Total 8 8 100.00
value1 4 4 100.00 100 1
value2 4 4 100.00 100 1
Crosses for Group : test::coverage_cross_ignored::something
Cross Expected Covered Percent Goal Weight
Total 15 7 46.67
MY_CROSS 15 7 46.67 100 20
====================================================
Summary for variable value1
Expected Covered Percent
User Defined Bins 4 4 100.00
User Defined Bins for value1
Bins
name count at least
S3 2 1
S2 4 1
S1 2 1
S0 3 1
====================================================
Summary for variable value2
Expected Covered Percent
User Defined Bins 4 4 100.00
User Defined Bins for value2
Bins
name count at least
M3 3 1
M2 3 1
M1 3 1
M0 2 1
====================================================
Summary for cross MY_CROSS
Samples crossed: value1 value2
Expected Covered Percent Missing
Total 15 7 46.67 8
Automatically Generated Cross Bins 15 7 46.67 8
User Defined Cross Bins 0 0
Automatically Generated Cross Bins for MY_CROSS
Uncovered bins
value1 value2 count at least
[S3] [M3 , M2] -- -- (2 bins)
[S3] [M0] 0 1
[S2] [M1] 0 1
[S1] [M3] 0 1
[S1] [M1 , M0] -- -- (2 bins)
[S0] [M2] 0 1
Covered bins
value1 value2 count at least
S3 M1 2 1
S0 M3 1 1
S0 M1 1 1
S2 M0 1 1
S2 M3 2 1
S2 M2 1 1
S1 M2 2 1
User Defined Cross Bins for MY_CROSS
Excluded/Illegal bins
name count
MY_CROSS_IGNORED 0 excluded
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|