User guide
21-51
OpenVera Native Testbench
The following system function returns the cumulative coverage (an
integer between 0 and 100) for the testbench:
function integer get_coverage();
The following system function returns the instance-based coverage
(an integer between -1 and 100) for the testbench:
function integer get_inst_coverage();
Note:
The get_inst_coverage() system function returns -1 when there
is no instance-based coverage information (that is, the
cumulative attribute of the coverage_group has not been set to
0).
See the OpenVera LRM: Native Testbench book for details on how
to query for the coverage of individual sample and crosses of each
coverage_group using the query() function.
Controlling Coverage Collection Globally
The coverage_control() system task (see the OpenVera LRM: Native
Testbench for description of this task), coupled with the
-cg_coverage_control runtime argument, provides a
single-point mechanism for enabling/disabling of the coverage
collection for all coverage groups or a particular coverage group.
Syntax
-cg_coverage_control=value