Due to the dynamic nature of classes, a port (interface) cannot be passed directly into a class. Therefore, we use virtual interfaces, which point to the actual interface.
The interface is used for connection of two modules.
The Virtual interface is used to connect a class (dynamic entity) to a module (static entity).
With virtual interfaces, abstract models and test programs can be separated from the actual signals that make up a design.
A virtual interface allows the same subprogram to operate on different portions of a design and to dynamically control the set of signals associated with the subprogram.
Virtual signals are used instead of the actual signals, so users do not need to refer to the actual signals directly. Changes to the underlying design do not require the code using virtual interfaces to be re-written.
Code reusability is promoted by virtual interfaces because they abstract the connectivity and functionality between blocks.
In addition to declaring virtual interfaces as property classes, the properties can also be initialized procedurally or by arguments to new(). In this way, different classes can share the same virtual interface.