Jump to content

sc_port get_interface() method


Recommended Posts



1. In IEEE doc @112, I see the following

Because the time at which deferred port binding is completed is implementation defined, it is implementation defined whether get_interface returns a pointer to a channel or a null pointer.


So where I shoudl check whether the port is bounded or not and accordingly take action so that my code works fine with all implementations.


2. For a multiport how to get all interfaces connected to that port. The get_interface returns only the pointer to first channel instance




Link to comment
Share on other sites

Check following member functions described in IEEE1666-2011

5.12.8 Member functions for bound ports and port-to-port binding size operator-> operator[]

Looks like everything should be bound before end_of_elaboration callback



You can also look into reference SystemC implementation source code to get the details.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...