|
|
|

|
|
|
|
|
|

|
|
 |
wildcard state
|
|
|
By default, Vera only matches a state bin definition that uses an x if the coverage point has an x in that bit position (the semantics are similar to the === operator). You can use the wildcard state bin definitions to make Vera consider an x in the bin definition as a wildcard. |
|
|

|
|
|
|
|
|

|
|
 |
Example
|
|
|

|
|
|
1 class coverage_wildcard_state {
2 bit [3:0] value;
3 event now;
4
5 coverage_group something {
6 sample_event = sync(ALL,now);
7 sample value {
8 wildcard state AB_1 (4'b10xx);
9 }
10 }
11
12 task update_coverage (bit [3:0] value) {
13 this.value = value;
14 trigger(now);
15 }
16 }
17
18
19
20 program test {
21 coverage_wildcard_state cov = new();
22 bit [3:0] v;
23 repeat (10) {
24 v = random();
25 printf("Value is %d\n",v);
26 cov.update_coverage(v);
27 delay(1);
28 }
29 }
You could download file coverage_wildcard_state.vr here
|
|
|

|
|
 |
Simulation log
|
|
|

|
|
|
Value is 12
Value is 13
Value is 15
Value is 9
Value is 13
Value is 10
Value is 6
Value is 3
Value is 15
Value is 5
|
|
|

|
|
 |
Coverage Report
|
|
|

|
|
|
Group : test::coverage_wildcard_state::something
====================================================
Group : test::coverage_wildcard_state::something
====================================================
Score Weight Goal
100.00 1 100
====================================================
Samples for Group : test::coverage_wildcard_state::something
Variable Expected Covered Percent Goal Weight
Total 1 1 100.00
value 1 1 100.00 100 1
====================================================
Summary for variable value
Expected Covered Percent
User Defined Bins 1 1 100.00
User Defined Bins for value
Bins
name count at least
AB_1 2 1
|
|
|

|
|
|

|
|
|

|
|
|
|
|
|

|
|
|
|
|
|

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