Jump to content

BUSWIDTH template with TLM2 sockets

Recommended Posts

Hello All

I have a confusion regarding the BUSWIDTH template with TLM2 sockets.

In TLM sockets e.g. tlm_initiator_socket/simple_target_socket, why we have BUSWIDTH template and what is the need for this.
If I want to transfer 256 bit data from an initiator (with tlm_initiator_socket port on it) to a target (with tlm_target_socket port on it), I can do it in one go by setting the data length and data pointer payload fields appropriately irrespective of the BUSWIDTH template.

Whether I use BUSWIDTH 1 or 8 or 16 or 32 and so on, I can still call the b_transport and transfer the data in one go.

So what is the significance of this BUSWIDTH template parameter.
Where it is actually makes a difference.



Link to comment
Share on other sites

If you are calculating the timing of the transfer, it makes a difference as to how much data is received in a single clock. 8-bytes on a byte-wide interface is eight times slower than a 64-bit interface. It's all about modeling. For Loosely-Timed models, it may not make as much difference since time is less important.

It also has application when considering endianess.

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