1 PROTOCOL SOLUTIONS GROUP 3385 SCOTT BLVD SANTA CLARA, CA 95054 SAS/SATA Protocol Suite Verification Script Engine Reference Manual Manua
10 The Verification script result DONE occurs when the script has been configured to extract and display some information about the trace, but not
11 Chapter 4: Running Verification Scripts from SASSuite/SATASuite To run a verification script over a trace, open the SASSuite/SATASuite main menu
12 The special dialog will open and display a list of verifications scripts. You can select one script to run, or several scripts to run in parallel
13 4.1 Running Verification Scripts After you select the script(s) to run, push the button Run scripts. VSE starts running the selected verificati
14 Right-click in the script list to open a pop-up menu with options for performing additional operations on the selected scripts: Run verificat
15 4.2 VSE GUI Settings After choosing Settings, the following dialog appears:
16 Chapter 5: Verification Script Engine Input Context Members All verification scripts have input contexts –special structures whose members are f
17 5.2 Trace Event-dependent Set of Members This set of members is defined and can be used only for a specific events or after calling some functi
18 5.2.3 SAS/SATA Generic Frame members in.Payload Bit source of the frame/sequence payload. You can extract any necessary information using th
19 For all function-specific fields of any frame/command type, refer to the actual field name in the trace file and access the same as follows:
2 Document Disclaimer The information contained in this document has been carefully checked and is believed to be reliable. However, no responsibili
20 5.2.5 SAS Identify Address Frame members Note: All members return the content of the matching field name ("in.xyz" returns the value
21 5.2.7.1 XFER_RDY SSP Frame in.Trp_SSPFrameType is SSP_FRAME_TYPE_ XFER_RDY (0x05) in.Trp_ReqOffset in.Trp_WriteDataLen 5.2.7.2 COMMAND SSP Fra
22 5.2.8.2.2 Report Manufacturer Info Frame members in.Trp_ReqLength 5.2.8.2.3 Discover Frame members in.Trp_Ignorezonegroup in.Trp_PhyId Not
23 5.2.8.2.27 Phy control members 5.2.8.2.28 PHY test function members 5.2.8.2.29 Configure phy event members 5.2.8.2.30 Configure zone permiss
24 5.2.8.3 SMP Response Frames members in.Trp_FuncResult in.Trp_RespLength 5.2.8.3.1 Report General Frame members in.Trp_ExpanderChgCount in.Tr
25 5.2.8.3.1.1.1.9 Report phy SATA members 5.2.8.3.1.1.1.10 Report route information members 5.2.8.3.1.1.1.11 Report phy event members 5.2.8.3.1.1.
26 5.2.9 SATA/STP Frame Members Note: All members return the content of the matching field name ("in.xyz" returns the value of field &quo
27 5.2.10 SCSI Command Frame Members Note: All members return the content of the matching field name ("in.xyz" returns the value of fiel
28 5.2.11 ATA Commands Frame Members Note: All members return the content of the matching field name ("in.xyz" returns the value of fiel
29 5.2.12 Metrics Fields for SCSI and ATA Commands (ONLY) Note: All members return the content of the matching field name ("in.xyz" retu
3 Table of Contents CHAPTER 1: INTRODUCTION ...
30 Chapter 6: Verification Script Engine Output Context Members All verification scripts have output contexts –special structures whose members are
31 Chapter 7: Verification Script Engine Events VSE defines a large group of trace "events", on packet, link, and split transaction level
32 Chapter 8: Declarations 8.1 Array Declarations Scripts can declare an array object. Format: Array( source, size, default_value ) Parameter
33 Arrays can grow and change dynamically through the functions: InsertAt, RemoveAt, and SetAt: set MyArray = Array( [1, 2, 3, 4, 5, 6] ); InsertA
34 Example 2 # Example of map having mixed types of keys - both integer and string. set MyMap = Map( [ [0, 1,
35 Chapter 9: Sending Functions This topic contains information about the special group of VSE functions designed to specify which events the verif
36 9.2 SendLevelOnly() This function specifies that ONLY events of the specified transaction level should be sent to the script. Format : SendLe
37 9.4 SendChannel() This function specifies that events that have occurred on the specified channel should be sent to script. Format : SendChan
38 9.6 DontSendChannel() This function specifies that events that have occurred on the specified channel should NOT be sent to the script. Format
39 9.9 DontSendTraceEvent() This function specifies that the event specified in this function should not be sent to script. Format : DontSendTr
4 9.21 SENDSTPTRANSPORT() ... 45 9.22 SENDSMPTRANSPORT(
40 9.12 SendProtocolError() This function specifies that a selected Protocol Error event be sent to the script along with any other events (if sent
41 Then only OOB-Sequence_Error events will be sent to the script. 9.14 DontSendProtocolError() This function specifies NOT to send the selected Pro
42 9.16 SendPairSASAddressOnly() This function specifies that ONLY the selected Pair-SAS-Address event be sent to the script, and no other events be
43 9.19 SendPrimitive() This function specifies to send a selected Primitive event to the script for verification. Format : SendPrimitive(Primitiv
44 9.20 SendSSPTransport() This function specifies to send a selected SSP Transport event to the script. Format : SendSSPTransport( Frame Type)
45 Example … SendSSPTransport (SSP_FRAME_TYPE_XFER_RDY); SendSSPTransport (SSP_FRAME_TYPE_XFER_RDY, “NumOfFillBytes”, 0); SendSSPTransport (SSP_FR
46 9.22 SendSMPTransport() This function specifies to send a selected SMP Transport event to the script. Format : SendSMPTransport( Frame Type)
47 9.23 SendSCSICommand() This function specifies to send a selected SCSI Command event to the script. Format : SendSCSICommand( OpCode, Servic
48 9.24 SendATACommand() This function specifies to send a selected ATA Command event to the script. Format : SendATACommand( Command, Feature,
49 9.25 SendSMPCommand() This function specifies to send a selected SMP Command event to the script. Format : SendSMPCommand( Function, Field N
5 CHAPTER 19: COM/AUTOMATION COMMUNICATION FUNCTIONS ... 73 19.1 NOTIFYCLIENT() ...
50 9.26 SendTaskMgmCommand() This function specifies to send a selected Task Management Command event to the script. Format : SendTaskMgmComman
51 Chapter 10: Time Construction Functions This group of functions constructs VSE time objects. 10.1 Time() Constructs a verification script time
52 Chapter 11: Timer Functions This group of functions covers VSE capability to work with timers –-- internal routines that repeatedly measure a t
53 11.2 GetTimerTime() Calculates and returns the timing interval (VSE Time object) between the Time-at SetTimer() and Current Time. For example, if
54 Chapter 12: Time Calculation Functions This group of functions covers VSE capability to work with "time" — VSE time objects. 12.1 Add
55 12.3 MulTimeByInt() Multiplies VSE time object by integer value. Format : MulTimeByInt (time, mult) Return values Returns VSE time objec
56 Chapter 13: Time Logical Functions This group of functions covers VSE capability to compare VSE time objects. 13.1 IsEqualTime() Verifies wheth
57 13.3 IsGreaterTime() Verifies whether or not one VSE time object is greater than the other VSE time object. Format : IsGreaterTime (time1,
58 Chapter 14: Time Text Functions This group of functions covers VSE capability to convert VSE time objects into text strings. 14.1 TimeToText()
59 Chapter 15: Output Functions This group of functions covers VSE capability to Enable, Disable, and Display of information/results in the output
6 Chapter 1: Introduction This document contains a description of the Teledyne LeCroy Verification Script Engine (VSE), a new utility in the SA
60 15.3 ReportText() Reports/Displays textual information in the output window of verification script engine. Format : ReportText (text) Par
61 Chapter 16: Information Functions 16.1 GetTraceName() This function returns the filename of the trace file being processed by VSE. If the scri
62 16.4 GetCurrentTime() This function returns the string representation of the current system time. Format : GetCurrentTime() Example Report
63 16.7 GetTraceStartPacketTime() This function returns time stamp of the first packet in trace file. Format : GetTriggerPacketNumber() Retu
64 Chapter 17: Navigation Functions 17.1 GotoEvent() This function forces the application to jump to some trace event and show it in the main trace
65 17.2 SetMarker() This function sets a marker (bookmark) for some trace event. Format : SetMarker( marker_text ) SetMarker( marker_text,
66 Chapter 18: File Functions This group of functions covers VSE capabilities to work with the external files. 18.1 OpenFile() This function opens
67 18.2 WriteString() This function writes a text string to the file. Format : WriteString( file_handle, text_string ) Parameters file_hand
68 18.4 WriteBin () This function writes content to a binary file. Format : WriteBin( bin_file_handle, variable ) Parameters bin_file_handle
69 18.5 ReadBin () This function reads content from a binary file. Case 1: Open and Read the content from a binary file The file should be opened
7 Chapter 2: Verification Script Structure Writing a verification script is easy, as long as you follow a few rules and have some understanding of
70 Example # This example demonstrates CASE 1, how to open and read data. # Opens file in binary mode with _APPEND functionality, # to read data. b
71 18.6 SeekToBegin () This function seeks the file read-write pointer from current position to the BEGIN of the file. Format : SeekToBegin(fi
72 18.8 ShowInBrowser() This function allows you to open a file in the Windows Explorer. If the extension of the file has the application registered
73 Chapter 19: COM/Automation Communication Functions This group of functions covers VSE capabilities to communicate with COM/Automation clients co
74 Chapter 20: User Input Functions 20.1 MsgBox() Displays a dialog-based message in a dialog box, waits for the user to click a button, and return
75 Return Values This function returns an integer value indicating which button the user clicked. Constant Description _MB_OK OK button was clicke
76 20.2 InputBox() Displays a dialog-based input prompt in a dialog box, waits for the user to input text or click a button, and returns a CSL list
77 Remark This function works only for VS Engines controlled via the GUI. For VSEs controlled by COM/Automation clients, it does nothing. This
78 20.3 GetUserDlgLimit() This function returns the current limit of user dialogs (message box or input box) allowed in the verification script. If
79 Chapter 21: String Manipulation/Formatting Functions 21.1 FormatEx() This function writes formatted data to a string. FormatEx() controls the wa
8 OnStartScript() { #################################################################################### # Specify in the body of this function
80 Remark A conversion specification begins with a percent sign (%) and ends with a conversion character. The following optional items can be inclu
81 21.3 Get and Set Characters in Strings You can set and get characters at positions in CSL-script-file string objects. Format : str [ index ]
82 Chapter 22: Miscellaneous Functions 22.1 ScriptForDisplayOnly() This function specifies that the script is designed for displaying information o
83 22.4 Pause() Pauses a running script. Later, script execution can be resumed or cancelled. Format : Pause() Example … If( Something_In
84 22.5 GetPacketData() This function returns packet’s data in unscramble 8 bits format as a list of DWORDs. Each item of the list includes one DWO
85 Chapter 23: The VSE Important Script Files The VSE working files are located in the ..\SASVFScripts or ..\SATAVFScripts subfolder of the main SA
87 Appendix A – Primitive Codes PRIM_CODE_ERROR PRIM_CODE_AIP_NORMAL PRIM_CODE_AIP_RESERVED_0 PRIM_CODE_AIP_RESERVED_1 PRIM_CODE_AIP_RESERVED_2 PRI
88 PRIM_CODE_RRDY_NORMAL PRIM_CODE_RRDY_RESERVED_0 PRIM_CODE_RRDY_RESERVED_1 PRIM_CODE_NOTIFY_ENABLE_SPINUP PRIM_CODE_NOTIFY_POWER_FAILURE_EXPECTED
89 Appendix B – ATA Commands See the include file “VS_ATA_Commands.inc“ in the ..\SASVFScripts or ..\SATAVFScripts subfolder of the main SAS Protoco
9 Chapter 3: Interaction Between SASSuite/SATASuite and a Verification Script When you run a script against a pre-recorded trace, the following seq
90 SERVICE = 0xA2 SET_FEATURES = 0xEF SET_MAX = 0xF9 SET_MAX_ADDRESS_EXT = 0x37 SET_MULTI
91 Appendix C – SCSI Commands See the include file “VS_SCSICommands.inc“ in the ..\SASVFScripts or ..\SATAVFScripts subfolder of the main SAS Protoc
92 SBC_ERASE12 = 0xAC SBC_MEDIUM_SCAN = 0x38 SBC_READ_GENERATION = 0x29 SBC_READ_UPDATED_BLOCK =
93 SSC_READ6 =0x08 SSC_READ_REVERSE6 =0x0F SSC_SPACE6 =0x11 SSC_VERIFY6 =0x13 SS
94 SPC_INQUIRY = 0x12 SPC_LOGSELECT = 0x4C SPC_LOGSENSE = 0x4D SPC_MODESELECT6 = 0x15 SPC_MODE
95 Appendix D – SMP Commands # Management Function definitions const SMP_REPORT_GENERAL = 0x00; const SMP_REPORT_MANUFACTURER_INFO = 0x
96 Appendix E – Limitation of For and While Loops To prevent infinite loops in improperly written script code there is a maximum limitation of 40,00
97 How to Contact Teledyne LeCroy Type of Service Contact Call for technical support… US and Canada: 1 (800) 909-2282 Worldwide: 1 (408) 727-66
Commenti su questo manuale