|
|
|
|
|
|
|
|
|
|
|
|
cumulative coverage on
|
|
|
When there is multiple instance of same coverage group, Like have AHB coverage per AHB master port in a multi master/slave AHB interconnect. We may want to just have cumulative coverage. |
|
|
|
|
|
This is done with reserve word cumulative, by default all functional coverage groups are cumulative mode. |
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
1 class coverage_cumulative_on {
2 bit [3:0] value;
3 event now;
4
5 coverage_group something {
6 sample_event = sync(ALL,now);
7 cumulative = ON;
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_on 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_on.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_on::something
====================================================
Group : test::coverage_cumulative_on::something
====================================================
Score Weight Goal
87.50 1 100
====================================================
Samples for Group : test::coverage_cumulative_on::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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|