yorkwar Posted March 25, 2015 Report Share Posted March 25, 2015 Hi, The code below in this function may be not appropriate. //get the interfaces bound to the top of the hierachical bind chain // NOTE: this could be the same socket if there is no hierachical bind m_used_sockets=get_hierarch_bind()->get_sockets(); IEEE-1666-2011 stated: The following actions may be performed directly or indirectly from the member functionbefore_end_of_elaboration.a) The instantiation of objects of class sc_module, sc_port, sc_export, sc_prim_channel. The instantiation of objects of other classes derived from class sc_object.c) Port binding.d) Export binding. In my case, I do some port binding in my sc_module's API of before_end_of_elaboration. Then, if tlm_utils::multi_passthrough_initiator_socket::before_end_of_elaboration() is called before the one in my sc_module, m_used_sockets may have the out-of-data of value. It still indicates that there's no binding for this socket. In fact, m_sockets really indicates that there's a binding now. Then subsequent usage of m_used_sockets may cause an error. Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted April 2, 2015 Report Share Posted April 2, 2015 I agree that this restriction is currently not mentioned explicitly in the standard. The only related part I've found is mentioned in IEEE 1666-2011, 16.1.4.4 (emphasis mine): k) As for SystemC multi-ports, if size is called during elaboration and before the callback end_of_elaboration, the value returned is implementation-defined because the time at which port binding is completed is implementation-defined. That said, I tend to agree that the preparation of the local callbacks can happen too early. I'll take this issue to the TLM Working Group for further discussion. Thanks for reporting! Greetings from Duisburg, Philipp Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.