User guide

24-244
SystemVerilog Testbench Constructs
In the Example 1-1, below, there is a SystemVerilog class MyClass
with an embedded covergroup covType. VCS finds the cumulative
coverage data for the covergroup MyClass:covType in the database
file Run1 and loads it into the covType embedded coverage group
in MyClass.
Example 24-45
class MyClass;
integer m_e;
covergroup covType @m_e;
cp1 : coverpoint m_e;
endgroup
endclass
...
$coverage_load_cumulative_cg_data("Run1", "MyClass::covType");
Loading Instance Coverage Data
The coverage data can be loaded for a specific coverage instance.
To load the coverage data for a standalone coverage instance, use
the following syntax:
$covgLoadInstFromDbTest
(coverage_instance,"test_name"[, "dir_name"]);
In this task, "dir_name" is optional. If you do not specify a "dir_name",
by default, simv.vdb is taken as the directory containing the database.
To load the coverage data for an embedded coverage instance, use
the following syntax:
$covgLoadInstFromDbTest
(class_object.cov_group_name,"test_name"[, "dir_name"]);
In this task, "dir_name" is optional. If you do not specify a "dir_name",
by default, simv.vdb is taken as the directory containing the database.