|
|
|
|
|
|
|
|
|
|
|
|
not state
|
|
|
With this construct, all values not recorded by other states increment the bin-hit counter for state_bin_name. |
|
|
|
|
|
state state_bin_name (not state); |
|
|
|
|
|
|
|
|
|
|
|
Example
|
|
|
|
|
|
1 class coverage_not_state {
2 bit [3:0] value;
3 event now;
4
5 coverage_group something {
6 sample_event = sync(ALL,now);
7 sample value {
8 state AB_0 (0:7);
9 state AB_1 (8:14);
10 bad_state AB_BAD (not state);
11 }
12 }
13
14 task update_coverage (bit [3:0] value) {
15 this.value = value;
16 trigger(now);
17 }
18 }
19
20
21
22 program test {
23 coverage_not_state cov = new();
24 bit [3:0] v;
25 repeat (10) {
26 v = urandom__range(14,0);
27 printf("Value is %d\n",v);
28 cov.update_coverage(v);
29 delay(1);
30 }
31 // This should cause verification error
32 v = 15;
33 printf("Value is %d\n",v);
34 cov.update_coverage(v);
35 delay(1);
36 }
You could download file coverage_not_state.vr here
|
|
|
|
|
|
Simulation log
|
|
|
|
|
|
Value is 13
Value is 14
Value is 4
Value is 4
Value is 2
Value is 8
Value is 6
Value is 7
Value is 6
Value is 2
Value is 15
VERIFICATION ERROR (VERA FUNCTIONAL COVERAGE):
Illegal State coverage_not_state::something:cov.value.AB_BAD = 0xf
(coverage_not_state.vr, line 7)
|
|
|
|
|
|
Coverage Report
|
|
|
|
|
|
Group : test::coverage_not_state::something
====================================================
Group : test::coverage_not_state::something
====================================================
Score Weight Goal
100.00 1 100
====================================================
Samples for Group : test::coverage_not_state::something
Variable Expected Covered Percent Goal Weight
Total 2 2 100.00
value 2 2 100.00 100 1
====================================================
Summary for variable value
Expected Covered Percent
User Defined Bins 2 2 100.00
User Defined Bins for value
Excluded/Illegal bins
name count
AB_BAD 1 illegal
Covered bins
name count at least
AB_1 3 1
AB_0 7 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 1998-2014 |
Deepak Kumar Tala - All rights reserved |
Do you have any Comment? mail me at:deepak@asic-world.com
|
|