|
|
|
|
|
|
|
|
|
|
|
|
cumulative coverage off
|
|
|
Sometime it is desired that we don't want to have cumulative coverage. This is done with reserve word cumulative set to OFF. |
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
1 class coverage_cumulative_off {
2 bit [3:0] value;
3 event now;
4
5 coverage_group something {
6 sample_event = sync(ALL,now);
7 cumulative = OFF;
8 sample value;
9 }
10
11 task update_coverage (bit [3:0] value) {
12 this.value = value;
13 trigger(now);
14 }
15 }
16
17
18
19 program test {
20 coverage_cumulative_off cov [2];
21 bit [3:0] v;
22 cov[0] = new();
23 cov[1] = new();
24 repeat (10) {
25 v = random();
26 printf("Value is 0 %d\n",v);
27 cov[0].update_coverage(v);
28 v = random();
29 printf("Value is 1 %d\n",v);
30 cov[1].update_coverage(v);
31 delay(1);
32 }
33 }
You could download file coverage_cumulative_off.vr here
|
|
|
|
|
|
Simulation log
|
|
|
|
|
|
Value is 0 12
Value is 1 13
Value is 0 15
Value is 1 9
Value is 0 13
Value is 1 10
Value is 0 6
Value is 1 3
Value is 0 15
Value is 1 5
Value is 0 2
Value is 1 7
Value is 0 1
Value is 1 10
Value is 0 14
Value is 1 4
Value is 0 4
Value is 1 11
Value is 0 6
Value is 1 10
|
|
|
|
|
|
Coverage Report
|
|
|
|
|
|
Group : test::coverage_cumulative_off::something
====================================================
Group : test::coverage_cumulative_off::something
====================================================
Score Instances Weight Goal
87.50 50.00 1 100
2 Instances:
cov[1]
----------------
Score Weight Goal
50.00 1 100
cov[0]
----------------
Score Weight Goal
50.00 1 100
====================================================
Samples for Group : test::coverage_cumulative_off::something
Variable Expected Covered Percent Goal Weight
Total 16 14 87.50
value 16 14 87.50 100 1
====================================================
Summary for variable value
Expected Covered Percent
Automatically Generated Bins 16 14 87.50
Automatically Generated Bins for value
Uncovered bins
name count at least
[auto[0]] 0 1
[auto[8]] 0 1
Covered bins
name count at least
auto[1] 1 1
auto[2] 1 1
auto[3] 1 1
auto[4] 2 1
auto[5] 1 1
auto[6] 2 1
auto[7] 1 1
auto[9] 1 1
auto[10] 3 1
auto[11] 1 1
auto[12] 1 1
auto[13] 2 1
auto[14] 1 1
auto[15] 2 1
====================================================
====================================================
Group Instance : cov[1]
====================================================
Score Weight Goal
50.00 1 100
Group:
test::coverage_cumulative_off::something
----------------
Score Instances Weight Goal
87.50 50.00 1 100
====================================================
Samples for Group Instance : cov[1]
Variable Expected Covered Percent Goal Weight
Total 16 8 50.00
value 16 8 50.00 100 1
====================================================
Summary for variable value
Expected Covered Percent
Automatically Generated Bins 16 8 50.00
Automatically Generated Bins for value
Uncovered bins
name count at least
[auto[0] - auto[2]] -- -- (3 bins)
[auto[6]] 0 1
[auto[8]] 0 1
[auto[12]] 0 1
[auto[14] - auto[15]] -- -- (2 bins)
Covered bins
name count at least
auto[3] 1 1
auto[4] 1 1
auto[5] 1 1
auto[7] 1 1
auto[9] 1 1
auto[10] 3 1
auto[11] 1 1
auto[13] 1 1
====================================================
====================================================
Group Instance : cov[0]
====================================================
Score Weight Goal
50.00 1 100
Group:
test::coverage_cumulative_off::something
----------------
Score Instances Weight Goal
87.50 50.00 1 100
====================================================
Samples for Group Instance : cov[0]
Variable Expected Covered Percent Goal Weight
Total 16 8 50.00
value 16 8 50.00 100 1
====================================================
Summary for variable value
Expected Covered Percent
Automatically Generated Bins 16 8 50.00
Automatically Generated Bins for value
Uncovered bins
name count at least
[auto[0]] 0 1
[auto[3]] 0 1
[auto[5]] 0 1
[auto[7] - auto[11]] -- -- (5 bins)
Covered bins
name count at least
auto[1] 1 1
auto[2] 1 1
auto[4] 1 1
auto[6] 2 1
auto[12] 1 1
auto[13] 1 1
auto[14] 1 1
auto[15] 2 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|