1 variable definition, 2 assigning variable values – Teledyne LeCroy Sierra M6-2 SAS_SATA Protocol Analyzer User Manual User Manual
Page 429

Sierra M6‐2 SAS/SATA Protocol Analyzer User Manual
427
Trainer Script Enhancements
Teledyne LeCroy
SATA Host
As a Host, Trainer can send commands and complete them in normal or some popular
error conditions. SATA Host can issue NCQ commands, necessary for SATA compliance
tests on SSD devices. Limitations are:
Does not save Read data or reuse bulk read data for next commands.
Sends only limited Write data patterns.
SATA Device
As a Device, Trainer can receive commands and respond to them in normal or some
popular error conditions. Limitations are:
Uses only one command at a time. Command queuing is not supported.
Does not save incoming write data. Sends back data for all LBAs or generates
counter/random data. Cannot be used as a real formatted partition. To use the
Trainer as a SATA Device in real configurations, only tools like IO‐METER (that can
work with un‐partitioned and un‐formatted drives) can be used.
5.13.1
Variable Definition
Variable definition is like definitions in programming languages. You can define up to 512
DWORD (32‐bit) variables. There is no constraint on variable names, except you cannot
use keywords. Variable scopes are general and you should define them in the script
header before the generation block.
The syntax of variable definition is:
VAR32
@VariableName1, @VariableName2, ...
VAR64
@VariableName
VAR64 holds field values greater than 32 bits, such as SASAddress.
Note:
Variable names should start with @.
5.13.2
Assigning Variable Values
You can set variable values in different ways:
Constant value: @varName1 = 1234
Other variable value: @varName1 = @varName2
Result of expression on other variables:
@varName1 = @varName1 + @varName2
Fields of last received frame: @varName1 = (SSPFrame)LRF::Frame-
Type,
where LRF is Last Received Frame
Note:
Specifying packet type (SSPFrame) before LRF causes last received frame to be this packet type,
and field start‐bit position is calculated according to the packet‐type definition.
Part of last received frame:
@varName1 = LRF[stratBitOffset:endBitOffset]
,