3 sas/sata generic frame members, 4 how to access frame members, Sas/sata generic frame members – Teledyne LeCroy SAS_SATA Protocol Suite Verification Script Engine Reference Manual User Manual

Page 18: How to access frame members

Advertising
background image


18

5.2.3

SAS/SATA Generic Frame members

in.Payload

Bit source of the frame/sequence payload.
You can extract any necessary information using the
GetNBits(), NextNBits(), or PeekNBits() functions.
Please refer to the CSL Manual for details about these functions.

in.PayloadLength

Length in bytes of the retrieved payload

in.SOF,
in.StartOfFrame

4-byte value of Start of frame primitive

in.EOF,
in.EndOfFrame

4-byte value of End of frame primitive

in.CRC

CRC value as transmitted

5.2.3.1

Setting and Getting byte order for fields retrieved by GetNBits() and NextNBits()

Script primitives can set and get the byte order for fields retrieved via GetNBits() and
NextNBits(). The primitives set or get the byte order (Little Endian or Big Endian) for the fields
retrieved from byte streams. By default, GetNBits() and NextNBits() use Big Endian byte order
for byte streams.

SetFieldByteOrder()
Sets field byte order.

GetFieldByteOrder() Gets field byte order.

Example

# Suppose byte stream 0xAA, 0xBB, 0xCC, 0xDD.

data = ‘AABBCCDD’;

short_fld = GetNBits( data, 0, 16 );
# Retrieve 16-bit field.
# short_fld = 0xAABB

SetFieldByteOrder( 1 );

# Little Endian


short_fld = GetNBits( data, 0, 16 );
# Retrieve 16-bit field.
# short_fld = 0xBBAA

5.2.4

How to Access Frame Members

IMPORTANT: Non-Compatibility with SASTracer VSE
The old SASTracer VSE used host-to-device register fields as ATA command fields.
The current VSE has changed that. Now, to get information of ATA of any event, use
IN.App.Command, where “Command” is a field of the ATA command, not a host-to-device
register (Transport layer).

The parameters of the “IN” context have changed to the SAS/SATA packet’s field.
For example, to show the “Interrupt bit” on a device-to-host register, you now use "IN.I", not the
old "IN.Interrupt".
In general, you must use field names based on the Sierra software, not field names based on
the SASTracer software.

Advertising