User guide
24-208
SystemVerilog Testbench Constructs
Scope of Support
VCS supports virtual interface declarations in the following locations:
• program blocks and classes (including any named sub-scope)
• tasks or functions inside program blocks or classes (including any
named sub-scope).
Variables with the virtual interface data type can be either of the
following:
• SystemVerilog class members.
• Program, task, or function arguments.
You cannot declare a virtual interface in a module or interface
definition.
Virtual Interface Modports
If only a subset of Interface data members is bundled into a modport,
a variable can be declared as “virtual Interface_name.modport_name”:
Example.
interface SBus;
logic req, grant;
modport REQ(input req);
endinterface
program P;
virtual Sbus.REQ sb;
The semantic meaning is the same as in the example above with the
difference that sb is now a reference only to a portion of Sbus and