RegisterLogin  
Update Profile
   
You are here: Forum  
Minimize 
SVUG Community Forum
Subject: About SV class...
Prev Next
You are not authorized to post a reply.

Author Messages
ManimaranUser is Offline

Posts:6

08/28/2008 10:54 PM  
Hi *,
Can anybody tell if a modport declared in the interface have the same name of a class declaration??

example:

         interface usb();

                  modport test ();

         end interface

in other .sv file can i have

         class test ---   
         
           endclass 

Thanks
regards
N.Manimaran.
ShalomUser is Offline

Posts:11

08/28/2008 11:27 PM  
Sure.

Shalom
ManimaranUser is Offline

Posts:6

08/29/2008 12:11 AM  
but it shows an error when i use like

interface usb();

modport test ();

end interface

in other .sv file i have

class test ---
virtual usb.test m_io; <-- shows error here as "unbound user defined type"
endclass
DavidUser is Offline

Posts:9

08/29/2008 11:04 AM  
try defining your own type, and then using it to declare your virtual interface
typedef virtual usb.test my_usb_test_t;
my_usb_test_t m_io;

OR
try declaring the virtual interface inside the class like this:
virtual usb m_io;

and referencing the modport whenever you need to like this:
m_io.test. ....
ManimaranUser is Offline

Posts:6

08/31/2008 6:07 AM  

yes i used as u suggested and it worked,

thank you

You are not authorized to post a reply.



ActiveForums 3.7
  

 Copyright 2008 by SystemVerilog User Group Contact Us    Privacy Statement