User guide
21-88
OpenVera Native Testbench
Some examples of compatibility:
Note:
A 2-valued array type in SystemVerilog cannot be directly mapped
to a 4-valued array in OpenVera. However, a cast may be
performed as follows:
// OpenVera
class Foo {
.
.
.
task vera_method(integer array[5]) {
.
.
. }
.
.
.
}
// SystemVerilog
int array[5];
typedef integer array_t[5];
import OpenVera::Foo;
Foo f;
.
.
.
f.vera_method(array); // Error: type mismatch
f.vera_method(array_t'(array)); // OK
.
.
.
Structs and Unions
Unpacked structs/unions can't be passed as arguments to OpenVera
methods. Packed structs/unions can be passed as arguments to
OpenVera SystemVerilog Compatible?
integer a[10] integer b[11:2]
Yes
integer a[10] int b[11:2]
No
reg [11:0] a[5] logic [3:0][2:0] b[5]
Yes