beautypg.com

Teledyne LeCroy Sierra M6-4 SAS_SATA Protocol Analyzer User Manual User Manual

Page 433

background image

    

Sierra M6‐4 SAS/SATA Protocol Analyzer User Manual

429

Sierra Trainer Generation Language

Teledyne LeCroy

else

{

….

}

While(@VarName)

{

…….

}

Example for if, then else:

@HT_RxFISType = LRF[0:7]

#LRF_SATA_FIS_TYPE_START_BIT:LRF_SATA_FIS_TYPE_END_BIT

if (@HT_RxFISType == SATA_FIS_TYPE_DMA_ACTIVATE) then {…}

else { if (@HT_RxFISType == SATA_FIS_TYPE_DATA) then {…}

else { if (@HT_RxFISType == SATA_FIS_TYPE_RD2H) then {…}

} }

Example for while: 

while (@NCQ_Temp0) {

@NCQ_Temp1= @NCQ_Temp1 >> 1

If (@NCQ_Temp1 != 0) then { … }

@NCQ_Temp0 = @NCQ_Temp1 & 0x00000001 }

Note:

In this release, while condition is limited to simple variable values only. Combining operators is

not allowed in while expressions. You should move such expressions inside while block.

Note:

Nested while and if are supported.

Wait/When/Do in Logical Expressions

The wait/when/do syntaxes are:

wait (time)

{when

{exp}do

{

….

}

elsewhen

{

{exp}do

{

….

}

on_timeout

{

….

}}

Example:

wait { #no timeout use global WaitTimeout value default 1000 useconds

(1 ms)