Jump to content

b_transport and register_b_transport


Recommended Posts

HI 

 

1) I think "b_transport" is the function which we use to do blocking transport.

    whereas "register_b_transport" is the function which we use in Target constructor to bind our target socket

    so that it can receive b_transport call, whenever this call is done.

 

    We call "b_transport" function in initiator  and define it in target.

 

2) I think the system will work, but you have to actually bind both these sockets in a "top" file.

 

 Regards,

 Rajit

Link to comment
Share on other sites

Yes rajit.a,

 

I had also seen in my model that

 

b_transport is used with initiator sockets 

 

and register_b_transport with target sockets

 

If i change b_transport with register_b_transport and vice versa, then there is compilation error

 

But I want to know about register_b_transport and b_transport more in details if there is something more to know about these

 

 

Regards

cam

Link to comment
Share on other sites

Hi Cam,

   register_b_transport is a feature of the "simple sockets". The idea of the simple sockets is that you register functions with the socket itself, and then when the user calls b_transport in a simple_target socket, it automatically calls the function you register.

 

The simple sockets are part of the TLM utilities - they are there for your convenience, but are not part of the interoperability layer.

 

Have a look at section 16.1.2 of IEEE 1666-2011

 

regards

Alan

 

P.S. One other thing people often overlook - when you use the simple sockets, you do *not* have to implement the fw_transport_if in your target - it is implemented for you in the simple target socket.

 

P.P.S. The function you register with register_b_transport does not have to be called b_transport - however that would be confusing if you decided to use another name.

Link to comment
Share on other sites

Yes rajit.a,

 

I had also seen in my model that

 

b_transport is used with initiator sockets 

 

and register_b_transport with target sockets

 

If i change b_transport with register_b_transport and vice versa, then there is compilation error

 

But I want to know about register_b_transport and b_transport more in details if there is something more to know about these

 

 

Regards

cam

 Hi amitk3553

 

 I don't think you can change b_transport with register_b_transport.

 Both have their specialized tasks. b_transport is for calling and register_b_transport is just for receiving.

 

 register_b_transport is only used in simple sockets case and not in tlm sockets.

 

 I hope this answers your query.

 

 Regards,

 Rajit 

Link to comment
Share on other sites

Hi Cam,

   register_b_transport is a feature of the "simple sockets". The idea of the simple sockets is that you register functions with the socket itself, and then when the user calls b_transport in a simple_target socket, it automatically calls the function you register.

 

The simple sockets are part of the TLM utilities - they are there for your convenience, but are not part of the interoperability layer.

 

Have a look at section 16.1.2 of IEEE 1666-2011

 

regards

Alan

 

P.S. One other thing people often overlook - when you use the simple sockets, you do *not* have to implement the fw_transport_if in your target - it is implemented for you in the simple target socket.

 

P.P.S. The function you register with register_b_transport does not have to be called b_transport - however that would be confusing if you decided to use another name.

What is the difference between simple sockets and TLM sockets

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.

Guest
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...