beautypg.com

Variable definition, Assigning variable values – Teledyne LeCroy Sierra M124 User Manual User Manual

Page 321

background image

    

Sierra M124 SAS/SATA Protocol Analyzer User Manual

319

Sierra Trainer Generation Language

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. 

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 @.

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::FrameType,

where LRF is Last Received Frame