Teledyne LeCroy Sierra M6-2 SAS_SATA Protocol Analyzer User Manual User Manual
Page 431

Sierra M6‐2 SAS/SATA Protocol Analyzer User Manual
429
Trainer Script Enhancements
Teledyne LeCroy
@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)
when {WF_OPEN_ACCEPT} do { … }
elsewhen {WF_OPEN_REJECT} do { … }
on_timeout { … } }
Example:
wait_for (100000) { WF_OPEN_ACCEPT WF_TIMEOUT} { … } # (100 ms)
Note:
Nested wait should not exceed 2 deep. Use a procedure call to extend wait logic sequence. Wait
+ Wait_For ok.