User guide
21-92
OpenVera Native Testbench
• The modport and the virtual port have the same number of
members.
• Each member of the modport converted to a virtual port must
either be (1) a clocking block or (2) imported from a clocking block
using the import syntax above.
• For different modports to be implicitly converted to the same virtual
port, the corresponding members of the modports (in the order in
which they appear in the modport declaration) be of bit lengths.
If the members of a clocking block are imported into the modport
using the cb.* syntax where cb is a clocking block, then the order
of those members in the modport is determined by their
declaration order in cb.
Example usage:
// OpenVera
port P {
clk;
a;
b;
}
class Foo {
P p;
task new(P p_) {
p = p_;
}
task foo() {
.
.
.
@(p.$clk);
.
.
.
variable = p.$b;
p.$a = variable;
.
.
.
}
}