User guide
21-78
OpenVera Native Testbench
}
class Derived extends Base {
virtual task vfoo(arguments) {
.
.
.
}
}
// SystemVerilog
import OpenVera::Derived;
Derived d = new; // OK
initial begin
d.foo(); // OK (Base::foo automatically
// imported)
d.vfoo(); // OK
end
Base b = new; // not OK (don't know that Base is a
//class name)
The above example would be valid if we add the following line before
the first usage of the name Base.
import OpenVera::Base;
Continuing the previous example, SystemVerilog code can extend
an OpenVera class as shown below: