Jump to content
Sign in to follow this  

Connect Socket to Empty Connection

Recommended Posts

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?


Share this post

Link to post
Share on other sites

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");

    if ( my_target_socket.size() == 0 ) {
        initator* dummy = new target("my_target_socket_name");



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this