noay Posted July 18, 2017 Report Share Posted July 18, 2017 I have a class that has two socket members (target and initator): // input (target) tlm_utils::simple_target_socket<class my_class> m_in; // output (initator) tlm_utils::simple_initiator_socket<class my_class> m_out; I wish to connect only one side each instance (m_in or m_out), how can I connect the other side to a NULL / EMPTY connection? Thanks Quote Link to comment Share on other sites More sharing options...
noay Posted July 18, 2017 Author Report Share Posted July 18, 2017 I used before_end_of_elaboration to bind to a dummy: void before_end_of_elaboration(){ if ( my_initiator_socket.size() == 0 ) { target* dummy = new target("my_initiator_socket_name"); my_initiator_socket.bind(*dummy); } if ( my_target_socket.size() == 0 ) { initator* dummy = new target("my_target_socket_name"); my_target_socket.bind(*dummy); } } 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.