User guide

21-79
OpenVera Native Testbench
// SystemVerilog
import OpenVera::Base;
class SVDerived extends Base;
virtual task vmt()
begin
.
.
.
end
endtask
endclass
Note:
- If a derived class redefines a base class method, the arguments
of the derived class method must exactly match the arguments
of the base class method.
- Explicit import of each data type from OpenVera can be avoided
by a single import OpenVera::*.
// OpenVera
class Base {
integer i;
.
.
.
}
class wrappedBase {
public Base myBase;
}
// SystemVerilog
import OpenVera::wrappedBase;
class extendedWrappedBase extends wrappedBase;
.
.
.
endclass
In the above example, myBase.i can be used to refer to this
member of Base from the SV side. However, if SV also needs to use
objects of type Base, then you must include: