Samuel Benjamin Posted February 25, 2020 Report Share Posted February 25, 2020 Hello , I am having a closed design which is running using SystemC 2.3.1 , When i updagraded to version 2.3.2 i found an error resulting from multi_socket_bases.h in the b_transport method "Call to b_transport without a registered callback for b_transport" as shown below. multi_socket_bases.h void b_transport(transaction_type& trans,sc_core::sc_time& t){ //check if a callback is registered if (m_b_f && m_b_f->is_valid()) { (*m_b_f)(m_id, trans,t); //do the callback return; } display_error("Call to b_transport without a registered callback for b_transport."); } Although , customer is supposed to be registering callbacks correctly as the register_b_transport function is called , but it looks like the callback pointers are not set due to an extra check as mention below in the end_of_elaboration function in multi_passthrough_socket.h // complete binding only if there has been a real bind bool unbound = (binders.size() == 1 && m_export_callback_created); // no call to get_base_interface has consumed the export - ignore if (unbound) return; void end_of_elaboration(){ //'break' here if the socket was told not to do callback binding if (m_eoe_disabled) return; //get the callback binders and the multi binds of the top of the hierachical bind chain // NOTE: this could be the same socket if there is no hierachical bind std::vector<callback_binder_fw<TYPES>* >& binders=get_hierarch_bind()->get_binders(); std::map<unsigned int, tlm::tlm_bw_transport_if<TYPES>*>& multi_binds=get_hierarch_bind()->get_multi_binds(); // complete binding only if there has been a real bind // THIS IS A NEW CHECK WHICH WAS NOT IN 2.3.1 bool unbound = (binders.size() == 1 && m_export_callback_created); // no call to get_base_interface has consumed the export - ignore if (unbound) return; //// // iterate over all binders for (unsigned int i=0; i<binders.size(); i++) { binders[i]->set_callbacks(m_nb_f, m_b_f, m_dmi_f, m_dbg_f); //set the callbacks for the binder if (multi_binds.find(i)!=multi_binds.end()) //check if this connection is multi-multi //if so remember the interface m_sockets.push_back(multi_binds[i]); else{ //if we are bound to a normal socket //get the calling port and try to cast it into a tlm socket base base_initiator_socket_type* test=dynamic_cast<base_initiator_socket_type*>(binders[i]->get_other_side()); if (!test){display_error("Not bound to tlm_socket.");} m_sockets.push_back(&test->get_base_interface()); //remember the interface } } } When I commented out this extra check , the design worked fine. I would appreciate if you can tell me what could be the reason for this check and what to check ? and if there are any known issues with this extra check ? i can see that there are some fixe 2.3.3 to check the hierarchial binding but it did not work too. Thanks, Samuel Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted February 26, 2020 Report Share Posted February 26, 2020 You can check the commit history of the file in the public GitHub repository. The chain of relevant changes are: b276fd3b ff4581f1 41ae779d Here are related discussions from the forum: Hope that helps, Philipp maehne 1 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.