Verification Guild
A Community of Verification Professionals

 Create an AccountHome | Calendar | Downloads | FAQ | Links | Site Admin | Your Account  

Login
Nickname

Password

Security Code: Security Code
Type Security Code
BACKWARD

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Modules
· Home
· Downloads
· FAQ
· Feedback
· Recommend Us
· Web Links
· Your Account

Advertising

Who's Online
There are currently, 54 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

  
Verification Guild: Forums

 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile  ProfileDigest    Log inLog in 

virtual methods in modports?

 
Post new topic   Reply to topic    Verification Guild Forum Index -> Main
View previous topic :: View next topic  
Author Message
giridhar
Senior
Senior


Joined: Apr 10, 2008
Posts: 14

PostPosted: Thu Sep 25, 2008 7:18 am    Post subject: virtual methods in modports? Reply with quote

hi,

can there be virtual methods(tasks or functions) in the modport declaration i.e can i import or export virtual methods in the modport.(of course in SystemVerilog)

enjoyyyyy
Back to top
View user's profile
giridhar
Senior
Senior


Joined: Apr 10, 2008
Posts: 14

PostPosted: Wed Oct 08, 2008 1:43 am    Post subject: Reply with quote

hello ........anyone please help...
not even one answer .....from the date of post ........
or i am thinking whether my question is wrong....

pls help......
Back to top
View user's profile
tusharv
Senior
Senior


Joined: Jul 18, 2008
Posts: 96
Location: india

PostPosted: Wed Oct 08, 2008 3:57 am    Post subject: Reply with quote

Check out in this post.

http://verificationguild.com/modules.php?name=Forums&file=viewtopic&t=2707&start=0&postdays=0&postorder=asc&highlight=modport
Back to top
View user's profile Visit poster's website
giridhar
Senior
Senior


Joined: Apr 10, 2008
Posts: 14

PostPosted: Fri Oct 10, 2008 3:42 am    Post subject: Reply with quote

hi,

thanks for the link.
but it didnt answer the question that whether the virtual methods can be used or not in the modports.

thanks
Back to top
View user's profile
AmreSultan
Senior
Senior


Joined: Jan 13, 2004
Posts: 77
Location: Ottawa, Canada

PostPosted: Fri Oct 10, 2008 9:08 am    Post subject: Reply with quote

I'm pretty sure that the answer is no. I'm assuming when you say virtual tasks/functions you talking in the context of the virtual keyword used in class methods.

There is no concept of polymorphism or inheritance (in the OOP sense) outside of SystemVerilog Classes. Even if you consider virtual interfaces my first statement still applies. When you import/export tasks/functions in modports they're from other modules or interfaces not from classes.

Amre
_________________
--Amre Sultan--
Back to top
View user's profile Visit poster's website
PaulM
Senior
Senior


Joined: Apr 10, 2006
Posts: 111
Location: Ottawa, Ontario, Canada

PostPosted: Fri Oct 10, 2008 12:51 pm    Post subject: Reply with quote

You could fake virtual methods by creating a class instance in your interface and having the interface's function/task call a method from the class. It would be a straightforward factory application to create an instance of an appropriate class derivative which had the actual method you wanted. Just a thought.

Paul.
_________________
Paul Marriott Ph.D.
Director Verification Engineering
XtremeEDA Corporation
613 254 9685 ext 208 (auto-links to mobile)
pmarriott@xtreme-eda.com
www.xtreme-eda.com
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Verification Guild Forum Index -> Main All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Verification Guild © 2006 Janick Bergeron
Web site engine's code is Copyright © 2003 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.687 Seconds