Jump to content
ZEESHAN KHATIB

Byte enable pointer attribute and Byte enable length attribute ?

Recommended Posts

4 hours ago, ZEESHAN KHATIB said:

 I tried to read from LRM couldn't understand  and tried to goggled didn't get,   Can anyone please explain Byte enable pointer attribute and Byte enable length attribute of generic payload  ?

It is explained in section 14.13 of SystemC standard.  You should read all items from a) to n) to understand all usage details.  From my experience, most models that I've seen do not use byte enables.

But let's consider a basic example. Suppose we have a a memory target and it receives following transaction: 

{
command = TLM_WRITE_COMMAND,
address = 0x0,
data[4] = { 0x1, 0x2, 0x3, 0x4 }
byte_enable[4] = { 0x0, 0xff, 0x0, 0xff }
}

byte_enable [ N ] == 0x0 means that N'th byte of data should be ignored by target.

Consider that memory had following values before processing the transaction:

memory[ 0 ] == 0xA;
memory[ 1 ] == 0xB;
memory[ 2 ] == 0xC;
memory[ 3 ] == 0xD;

Since byte_enable[0] and byte_enable[2] are equal to 0x0, it means that corresponding bytes will be ignored during processing of transaction. So after processing the transaction memory will hold following values:

memory[ 0 ] == 0xA;
memory[ 1 ] == 0x2;
memory[ 2 ] == 0xC;
memory[ 3 ] == 0x4;

Share this post


Link to post
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...