rahuljn Posted June 9, 2014 Report Share Posted June 9, 2014 Hi Experts Is there a way to stub unused tlm sockets to avoid port not bound error ? In my top I have toomanymodules and thus too many tlm_initiator_sockets/tlm_traget_sockets. only some of them needs to be connected,not all Is there a way (e.g.module which can be instantiated) which ensures default binding of unused ports Thanks Quote Link to comment Share on other sites More sharing options...
apfitch Posted June 9, 2014 Report Share Posted June 9, 2014 Since SystemC 2.1 (I think) it's been possible to set a port binding policy when creating a port. It is a template argument which defaults to SC_ONE_OR_MORE_BOUND, i.e. you must bind at least once. You can change it to SC_ZERO_OR_MORE_BOUND. See the LRM for details. Another trick that is sometimes used is to instance dummy channels in the before_end_of_elaboration() callback, and bind them to any unbound ports. regards Alan Quote Link to comment Share on other sites More sharing options...
rahuljn Posted July 24, 2014 Author Report Share Posted July 24, 2014 Hi Alan Any example for dummy chanel in TLM2 ? Thanks Quote Link to comment Share on other sites More sharing options...
SumitK Posted December 27, 2016 Report Share Posted December 27, 2016 Hi Alain In Systemc 2.3.1 if I left the following ports unbounded, I get elaboration error (Error: /OSCI_TLM-2/multi_socket: ERROR in instance memory_inst.AXI_Slave: Not bound to tlm_socket) tlm_utils::multi_passthrough_initiator_socket<initiator, 32, tlm::tlm_base_protocol_types,0,SC_ZERO_OR_MORE_BOUND> AXI_Master; tlm_utils::multi_passthrough_target_socket<initiator, 32, tlm::tlm_base_protocol_types,0,SC_ZERO_OR_MORE_BOUND> AXI_Slave; But in 2.3.0, there were no elaboration error with that. Thanks Sumit 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.