User guide

21-96
OpenVera Native Testbench
class A
{
B b;
coverage_group cg {
sample x(b.c);
sample y(b.d);
cross cc1(x, y);
sample_event = @(posedge CLOCK);
}
task new() {
b = new;
}
}
// SystemVerilog
import OpenVera::A;
initial begin
A obj = new;
obj.cg.option.at_least = 2;
obj.cg.option.comment = "this should work”;
@(posedge CLOCK);
$display("coverage=%f", obj.cg.get_coverage());
end
Use Model
Any `define from the OV code will be visible in SV once they are
explicitly included.
Note:
OV #define must be rewritten as `define for ease of migration
to SV.
Support for multiple program blocks in OV and SV is not present at
this time.