Jarodw Posted November 30, 2017 Report Share Posted November 30, 2017 I just downloaded the SystemC 2.3.2 and found that the same design works in 2.3.0 but doesn't work in 2.3.2. The design utilizes the hierarchical bind as: initiator->parent_target->target It reports error with SystemC 2.3.2: Error: /OSCI_TLM-2/multi_socket: parent_target.multi_passthrough_target_socket_0: Call to b_transport without a registered callback for b_transport The b_transport is registered for target but not for parent_target. This used to be work fine in 2.3.0. Am I missing something here? Full code: #include <systemc.h> #include <tlm.h> #include "tlm_utils/multi_passthrough_initiator_socket.h" #include "tlm_utils/multi_passthrough_target_socket.h" #define SC_INCLUDE_DYNAMIC_PROCESSES using namespace std; using namespace sc_core; using namespace tlm; class target : public sc_module { public: target( sc_module_name module_name ) { cout << "Construct target" << endl; t00.register_b_transport(this, &target::b_transport); } tlm_utils::multi_passthrough_target_socket<target> t00; void b_transport(int ID, tlm::tlm_generic_payload& bp, sc_time& delay) { cout << "Calling t00 b_transport" << endl; } }; class parent_target : public sc_module { public: parent_target( sc_module_name module_name ) { cout << "Construct parent_target" << endl; p_target = new target("target"); t0.bind(p_target->t00); } tlm_utils::multi_passthrough_target_socket<parent_target> t0; target *p_target; }; class initator : public sc_module { public: initator( sc_module_name module_name ) { cout << "Construct initator" << endl; SC_THREAD(thread0); } tlm_utils::multi_passthrough_initiator_socket<initator> i0; SC_HAS_PROCESS(initator); void thread0 (void) { cout << "Enter thread0" << endl; tlm_generic_payload p0; sc_time delay = SC_ZERO_TIME; i0->b_transport(p0, delay); cout << "Exit thread0" << endl; } }; int sc_main(int argc, char* argv[]) { initator m_initator("initator"); parent_target m_parent_target("parent_target"); m_initator.i0.bind(m_parent_target.t0); sc_start(); return (0); } Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted November 30, 2017 Report Share Posted November 30, 2017 From my point of view it is a regression. Standard says explicitly that one hierarchical bind is allowed for multi_passthrough_target_socket. I will put a bug to tracker. Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted November 30, 2017 Report Share Posted November 30, 2017 Looks like specific to multi_passthrough_target_socket. Simple sockets work fine with hierarchical bind. Quote Link to comment Share on other sites More sharing options...
Jarodw Posted December 1, 2017 Author Report Share Posted December 1, 2017 Thanks Roman. Is there a way that I can see the progress of this bug? We use multi passthrough socket a lot. Quote Link to comment Share on other sites More sharing options...
Roman Popov Posted December 1, 2017 Report Share Posted December 1, 2017 14 hours ago, Jarodw said: Thanks Roman. Is there a way that I can see the progress of this bug? We use multi passthrough socket a lot. As I understood, currently only Accellera members have access to SystemC GitHub repos. ( I heard that there are plans to make SystemC development open to general public, but we are not there yet) So if your company is Accellera member, you can ask your account manager to request an access for you. Meanwhile the best thing you can do is to stay on 2.3.1 until bugfix for 2.3.2 will be published. Quote Link to comment Share on other sites More sharing options...
Philipp A Hartmann Posted December 2, 2017 Report Share Posted December 2, 2017 Hi Jarodw, Thanks for your report. I can confirm and reproduce the issue in SystemC 2.3.2. It looks indeed like a regression compared to SystemC 2.3.0/1 that has been introduced by the fix for optionally unbound sockets, see: It seems, the SystemC regression tests didn't cover the hierarchical binding for the multi sockets, so it wasn't caught before the release. Your example can be fixed by changing line 228 in src/tlm_utils/multi_passthrough_target_socket.h: if (unbound && !m_hierarch_bind) return; // ^-- add check for hierarchical binding here Hope that helps, Philipp AmeyaVS and maehne 1 1 Quote Link to comment Share on other sites More sharing options...
Jarodw Posted December 4, 2017 Author Report Share Posted December 4, 2017 Thanks Philipp, I also saw the bug regarding optionally unbound sockets in SystemC 2.3.1 which we also encountered, so I thought I tried my luck with 2.3.2. We will stick to 2.3.0 until the issue is fixed. 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.