Jump to content

sc_port get_interface() method


rahuljn

Recommended Posts

Hello

 

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

 

Thanks

RJ

Link to post
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
 

5.12.8.1 size

5.12.8.2 operator->
5.12.8.3 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 post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...