RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: virtual interface vs interface
Prev Next
You are not authorized to post a reply.

Author Messages
SOMUUser is Offline

Posts:2

10/01/2008 1:53 AM  
Hi, I have been trying to find out whats the difference between an interface and an virtual interface. From the looks of it, I am not able to pull out a situation where its illegal to use one instead of the other. Anyone knows whats the deal between these constructs?
AMALUser is Offline

Posts:24

10/03/2008 9:20 AM  
Think of a virtual interface as a handle to a concrete interface object. Similar to a class handle and the object referenced by that handle.

You need to assign an interface to a virtual interface somehow to be able to access that interface signals/tasks/functions.

my_interface if;
virtual my_interface vif;

if.??? works fine, but vif.??? does not work yet, unless you do:

vif = if;

then you can access the members: vif.???

-- Amal
SOMUUser is Offline

Posts:2

10/13/2008 4:44 AM  
Thanks Amal.
VERIFCONSULTUser is Offline

Posts:8

10/18/2008 1:05 PM  
Virtual interface is used to isolate the models and drivers from the actual signals that make up the design. For eg passing the virtual interface to the driver logic we can isolate the design, so same function can be used to modify multiple interfaces(code reuse) , which is not possible without virtual interface.
You are not authorized to post a reply.
Forums > General Discussion > Main Discussion Area > virtual interface vs interface



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement