what is meant by virtual interface? usage of virtual interface? Difference between virtual interface and normal interface block? where should i use virtual interface? what is the use of virtual interface? why should i declare normal interface as a virtual interface inside SV environment . can any one explain clearly with simple example.
The interface is used to simplify the connection between DUT and Testbench. As the interface can’t be instantiated inside a class or program block, we need a virtual interface to point the physical interface.
So, the virtual interface is a pointer to the actual interface and using virtual interface, a class can point to different physical interfaces, dynamically (at run time).
Interface signals are static ( Physically available ) & where Class are dynamic and which needed virtual interface to communicate the actual interface signals.
No,
System verilog program block construct says :
“A program block may contain one or more initial or final procedures. It shall not contain always procedures,primitives, UDPs, or declarations or instances of modules, interfaces, or other programs.”