User guide
21-52
OpenVera Native Testbench
The values for -cg_coverage_control are 0 or 1. A value of 0
disables coverage collection, and a value of 1 enables coverage
collection.
Example 21-2
#include <vera_defines.vrh>
coverage_group Cov{
sample_event = @(posedge CLOCK);
sample x {
state x1(10);
state x2(20);
state x3(30);
state x4(40);
state x5(50);
state x6(60);
state x7(70);
}
}
coverage_group Another{
sample_event = @(posedge CLOCK);
sample x{
state x1(10);
state x2(20);
state x3(30);
state x4(40);
state x5(50);
state x6(60);
state x7(70);
}
}
task query_and_print(string str){
printf("Coverage is %d:%s\n",c.query(COVERAGE), str);
}
program test{
integer x = 0;
Cov c = new;