Jump to content

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: 

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

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