LeCroy Corporation
5.2.1.3.12
Getting Values of the Fields not present in Input Context
As mentioned earlier, not all the possible fields of USB3 packets are passed as members of Input Context. The
following are examples of using
not present in Input Context.
If( in.TraceEvent == _USB3_LMP_PKT )
{
# Example of using decoded packet information for LMPs.
# 'SubType' field,
# String value
str = FormatEx("\tSubType(str) = '%s'", GetDecodedPktField("SubType"));
ReportText( str );
# Hex Value
val = GetHexPktField ( "SubType" );
str = FormatEx( "\tSubType(hex) = 0x%X\n", val );
ReportText( str );
# 'Hseq' field
# String value
str = FormatEx( "\tHseq(str) = '%s'", GetDecodedPktField ( "Hseq" ) );
ReportText( str );
# Hex Value
val = GetHexPktField ( "Hseq" );
str = FormatEx( "\tHseq(hex) = 0x%X\n", val );
ReportText( str );
}
if( ( in.TraceEvent == _USB3_TP_PKT ) && ( in.SubType == TP_ACK ) )
{
# Example of using decoded packet information for TPs.
# 'SeqN' field
# String value
str = FormatEx( "\tSeqN(str) = '%s'", GetDecodedPktField ( "SeqN" ) );
ReportText( str );
# Hex Value
val = GetHexPktField ( "SeqN" );
str = FormatEx( "\tSeqN(hex) = 0x%X\n", val );
ReportText( str );
# 'NumP' field
# String value
str = FormatEx( "\tNumP(str) = '%s'", GetDecodedPktField ( "NumP" ) );
ReportText( str );
GetHexPktField
and
GetDecodedPktField
Verification Script Engine Reference Manual
functions to get values of the fields
Page 26 of 107