Jump to content

How to dangle unused socket in systemc2.3.3


Recommended Posts

I'v declared a target socket as below inside a sc_module:

tlm_utils::multi_passthrough_initiator_socket<base_class_name, 32, my_cmd_protocol_t, 0, SC_ZERO_OR_MORE_BOUND> my_socket_name;

This socket is only used in some simulation platforms, to make my code consistent, it's declared here.

This code passes compiling phase, while in run phase, it reports: 

Error: (E109) complete binding failed: export not bound: export 'my_socket_name' (tlm_target_socket) In file: sc_export.cpp:137

After checking the source code:

SystemC 2.3.3: 

    if ( get_interface() == 0 )
        report_error( SC_ID_COMPLETE_BINDING_, "export not bound" );
        // may continue, if suppressed

    sc_module* parent = static_cast<sc_module*>( get_parent_object() );
    sc_object::hierarchy_scope scope( parent );

My question is that, is there any way I can dangle this socket (since the comment indicates there might be some way to suppress this error).


Link to comment
Share on other sites

  • 2 weeks later...

A TLM2.0 socket consist of 2 parts: the port connecting to another socket and an export exposing interfaces to be connected to a port. If you use SC_ZERO_OR_MORE_BOUND this only changes the port part which is fine since you don't want to connect to a target socket. But the export needs to have an bw interface implementation. For an initiator module this should not be a problem as the it needs to bind a bw interface. For a hierarchical port you may bind a dummy implementation of the bw interface.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...