Home

ST Automated Test Suite User Manual

image

Contents

1. The Remove Selected Test Case s button fifth form left deletes the selected tests from the list of potential running tests You can select multiple rows using CTRL Right Click The Remove All Test Case s button sixth from left removes all tests from the running queue Upon completion of a test run the View HTML report of latest run button seventh form left opens a summary report The HTML report summarizes the test results including the result suspected error code and test execution details If individual test cases generate a fail result hyperlinks are added to navigate directly to the error point in the trace file Figure 2 7 Upon completion of a test run the View XML report of latest run button eighth from left opens an XML version of the summary report The Load Project button second from right loads saved Projects from a folder A Project is a collection of scripts The scripts are listed in the right pane The Save Project button at the right saves the current Project to a folder 2 4 Output Window The Output Window Figure 2 6 provides a real time test log in text format The software generates a text based report during execution of the test run and appends the report to the Output Window as each test completes The log summarizes the status of the each test and alerts you to possible test operation problems as they are detected Output MEME Figure 2 6 Buttons The Save Log button second from left
2. For several port configurations you can run Analyzer Trainer Host Emulator Device Emulator and Infusion at the same time For possible port configurations refer to the Automation API Reference Manual You can run Analyzer with all other functionalities Use the following examples of Analyzer Host Device and Trainer Infusion to write your own mixture configuration automation tests Note that error checking parts have been removed from these examples Analyzer Host Device 92292 set port configuration to DEVICE_CONFIG_AHE_0_ADE_0 MySASAutomation SetPortConfiguration 0 100 MESES Run an Analyzer Exerciser project MySASAutomation StartRecording E lAnalyzerHostDevice AHE 0 ADE 0 sac APA Sas Activate a Target Emulator project MySASAutomation ActivateDevice E Projects DeviceOnly std dae can wait for 5 seconds WScript Sleep 5000 ER RSS Deactivate devic MySASAutomation DeactivateDevice SAS Stop recording and make trace fil MySASAutomation StopRecording FALSE K Open trace file and have access to its trace file and later close it Set SASTracer MySASAutomation OpenFile E lAnalyzerHostDevice AHE 0 ADE 0 scs TERA Call a function to see how many packet there are in trace fil MySTATS ReportText Number of packets in trace file amp CSTR SASTracer GetPacketsCount i Close trace f
3. _T17 TLI channel _I18 ITESM channel _T18 LIS channel _119 TIO channel _T19 STL channel _I20 120 channel _T20 MIZONS channel _121 LCA E channel r21 is channel _122 DEE channel _T22 5 UT T22 3 channel _123 LS channel _T23 NTZS Na channel _124 vIz4 26 0000000000000000000000000 CT CEET EECH ETAT 0 00 ELE Or ET EE ET ET E ET 81 CT CT ET EI Os Oo OO EE 070 EI OI 0 nannel nannel nannel nannel nannel nanne l nannel nannel nannel nannel nannel nannel nannel nannel nanne 1 nanne nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel nannel T24 T24 125 125 T25 TOS 126 WEE T26 T26 127 127 T27 T27 128 i28 T28 mTOR 129 129 T29 T29 130 130 T30 T30 131 I31 T31 ATSI 132 I32 T32 TSO 133 133 T33 T33 134 I34 T34 T34 135 nl T35 T35 136 136 T36 r36 Lis eii 15 T S TI_ A I2 EE TL T2 TL I3_1 To T Sic e EE T4 T 4 A 15 ER T5_ T DES
4. FE EE TE HETE EHE E E EE l_name FE FEAE FE AE E FE AE FE FE FE FE AE AE FE AE FE FE AE FE FEAE FE AE FE FE AE FE FE AE FE AE AE FE AE AE FE AE FE FE AE FE AE AE TE AE FE FE E FE HEFE E H This function returns the name of the current event HEHE THEE HHH EventName dd event in TraceEvent event_name select even even even even even even even even Fr tt CR GE ct CR E default packet level events FRM PRIMITIVE _FRM PRIMITIVE FRM_AF_OPEN _FRM_AF_ OPEN EM Ap IDENTIFY _FRM_AF IDENTIFY FRM_SSP _FRM_SSP FRM_SMP _FRM_SMP FRM_STP _FRM_STP _FRM_OOB_SIGNAL _FRM_OOB_SIGNAL FRM_STP_INCOMPELETE _FRM_STP_INCOMPELETE FormatEx return event_name 28 DH Unknown d event GetFullTimestamp time_obj seconds time_obj 0 total_nanoseconds time_obj 1 miliseconds total_nanoseconds 1000000 microseconds total_nanoseconds 1000000 miliseconds 1000 nanoseconds total_nanoseconds 1000000 miliseconds 1000 microseconds timestamp_str FormatEx 4d 03d 03d 03d seconds miliseconds microseconds nanoseconds return timestamp_str GetCurrTimestamp return GetFullTimestamp in Time e This function returns HH HH HHH HE HH HH HE HE HE HERE REEEE EE H
5. saves the Log to a text file The Print Log button second from right prints the Log The Clear button at the right clears the window 2 5 Menus The Menus are o File Configuration Settings Exit o Run Run Stop o Commands Add Remove Add All Remove All o View Toolbar Status Bar Workspace Output o Reports HTML XML o Help Help Topics About LeCroy STATS 10 3 Operation of the Automated Test Suite Software When an initial test run starts the software takes the following steps 1 The Run all button starts execution in sequential order of all tests in the Test Monitoring Console 2 Within the Output Window oo Start Recording indicates that the Analyzer begins recording traffic Start Generation indicates that the Trainer starts to execute the test script Waiting displays while the test is executing Stop Generation displays when the test script has finished executing Stop Recording displays when the Analyzer has stopped capturing data and automatically begins uploading the trace file Run Verification Script indicates the appropriate verification script has been retrieved and is automatically analyzing the results of the test Passed or Failed displays based on the result of the test Finished displays after the test result updates in the Test Monitoring Console Retry displays when Fail is logged for a given test and the automatically re run test option is enabled in the Settings dialog W
6. 2 3 Test Monitoring Console The Test Monitoring Console Figure 2 5 lists the tests that have been selected for execution their results and their descriptions bme tz ug GSM STATS Test Result Detail Figure 2 5 After adding a test using the Add button in the Workspace Area the test appears in the Test Monitoring Console The Result column displays the test status upon completion The Result field may display Passed Failed or Done e When the test passes Pass is shown in the Result field on a green background e When the test fails Fail is shown in the Result field on a red background e When the test executes and the verification process is unable to confirm the expected behavior Done is shown in the Result field on a gray background rarely occurs e When the test is unable to capture a valid trace file the software displays a message Error during recording No trace file created If the test fails the verification software shows an error code in the Description field Buttons The green Run all button at the left starts execution in sequential order of all tests in the monitoring window The black Stop button second from left allows you to stop execution of the current test run The Run Failed Test Case s button third from left runs the failed test cases again The Run Selected Test Case s button fourth from left runs the selected test cases You can select multiple rows using CTRL Right Click
7. Description Else MySTATS ReportText Recording is stopped End If To get the object of the generated trace file call the OpenFile function to open the file and return the reference Set SASTracer MySASAutomation OpenFile E Output Device 1 AnalyzerOnly scs If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Trace file is opened End If 15 Make Recording You can call the MakeRecording function using as input parameter the path of the Analyzer project to start capturing using the current the triggering strategy and specified sample size After those limits are reached the device stops and the trace file is generated With this option you do not need to wait for capturing The function return value is the reference to the generated trace file Set SASTracer MySASAutomation MakeRecording E Make Recording sac If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Trace is created End If Closing After SASTracer is opened and used close it by calling the Close function SASTracer Close 4 4 Running Host Emulator Running a Host Emulator project is similar to running an Analyzer project You can use either the Start Recording or MakeRecording option Use the Host Emulator project as
8. E Projects AnalyzerTrainer ssg If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is started End If SAO Stop Generation ySASAutomation StopGeneration If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is stopped End If To exit call the GetTrainerExitCode function Use the following code to exit generation for port 0 of board 0 ExitCode MySASAutomation GetTrainerExitCode 0 0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText ExitCode is Received End If 18 4 6 Running InFusion You can use the SASAnalyzer automation object to run InFusion and start scenarios from previously saved libraries 1 Set scenario to port Assigns a scenario from a library to a specific port of the board 2 Start scenario Starts scenario on the specified port of the board 3 Stop scenario Stops scenario on the specified port of the board Depending on the port configuration and the number of Jammer ports you may need to repeat the steps For example if you have 2 ports of Jammer DEVICE_CONFIG_J_J_0 0 and you want to start scenario on ports 0 and 1 use the following code a set port configuration of board to DEVICE_CONFI
9. EH HE HH HEE HH HH EH HE HE HE HE HH HE EH HH FE HE HH HH EH HE FH HE EH HE EEE HEH Common Globals e set State 0 Main state machine input This variable may be used for implementation of different kinds of state machines set StartScript 1 indicates that it first run set str DD global buffer supposedly for string values set val 0 global buffer supposedly for integer or other values dd 4 44 FEAE FE AE AE FE AE E FE AE FE FE AE FE FE AE FE AE FE FE AE FE FE AE FE AE AE FE AE FE FE AE FE AE AE TE AE FE FE E FE EE E H FUNCTIONS dd dd ARRIAGA AAA Common reset actions which should be performed for any verification script preparing it for consecutive runs The VSE will call this function for any script after it has finished running dd OnResetScript State 0 StartScript 1 ResetScript dd 24 This function specifies that the verification is passed and the script should complete its work HRT 44 HEHE HE EE RE HE HEH EE EE ER EE EEE EE EE HE EE 444444 4414444444 EEE RE EEE RE EE EEE RE EE ScriptPassed out Result _VERIFICATION_PASSED HRT HE 4 4 HE EEE HE HE EEE EE HEE EE EE EE EE 446 444 EE 444444 4414444444 EEE RE EE HEE HE EEE RE EE This function specifies that the verification is failed and the scri
10. HE EEE Ojo 32 4 4 4 44 44 EE EERE HEH EERE EE FEE EH ytes to string HERE TE EE TE HE TE FE EE HE EEE EE EERE HEH EEE EE EEE EH for index 0 index lt sizeof RawBytes index if RawBytes index lt 0x0F ByteFormat FormatEx 0 X RawBytes index else ByteFormat FormatEx 2X RawBytes index RawFormat ByteFormat RawFormat ReportText RawFormat return RawFormat 30 RawBytes index FEFE FE HE E FE FE FE HE TE FE FE HE FE FE FE FE E TE FE FE HE E TE FE FE HE TE FE FE FE E TE AE FE EE TE HE EE TE FE FE EE ERE EE 44 E E E E E E E E E E HH This function Check the left raw data value is bigger than the right one 4 HE HHH EE EEE 4 FE HE E TE FE FE HE E TE FE FE HE TE FE AE FE E TE FE FE HE TE AE FE FE AR IsRawDataBigger LeftRaw RightRaw LeftRawSize sizeof LeftRaw RightRawSize sizeof RightRaw if LeftRawSize gt RightRawSize return 1 if LeftRawSize lt RightRawSize return 0 if LeftRawSize RightRawSize for index RightRawSize 1 index gt 0 index for index 0 index lt RightRawSize index if LeftRaw index gt RightRaw index return 1 if LeftRaw index lt RightRaw index return 0 return 0 HERE REE EE HEHE EE EEE EE EE HEHE EE HEE EE HE EEE HE EE EE HEE EE EERE HE REE RE This function outputs the information of the current event HERE REE EE HE HEHE EE EERE HE E
11. Script Set MySASAutomation WScript CreateObject LECROY SASAnalyzer If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description End If ySTATS ReportText Analyzer is created successfully The STATS Objects has the following reporting functions o HRESULT ReportText BSTR bstrText Reports the text that will appear on the output bar in the STATS environment o HRESULT ReportError LONG nErrorCode BSTR bstrDescription Reports possible errors with error codes and descriptions that appear on both the output bar and the Detail column of the running area in the STATS software o HRESULT ReportResult LONG nResult Sends the result of the automation test to display on the Result column of the running area in the STATS environment Numbers indicate 0 Not Applicable N A 1 Pass 2 Fail 12 Other STATS object available functions are O o O 0060 0 oo oo Oo Oo 0 o O 00 O HRESULT GetVersion in EAnalyzerVersionType version_type out retval WORD analyzer_version HRESULT OpenFile in BSTR file_name out retval IDispatch trace HRESULT StartGeneration in BSTR gen_file_name HRESULT StopGeneration void HRESULT StartRecording in BSTR ro_file_ name HRESULT StopRecording in BOOL abort_upload HRESULT MakeRecording in BSTR ro_file_ name out retval IDispatch trace HRESULT LoadDisplayOptions in BSTR do_file_name in short do_layers HRESULT GetR
12. the parameter rather than the Analyzer project Set your port configuration to the device type that has at least one port of Host Emulator functionality for example DEVICE_CONFIG_HE_0_0_0 16 4 5 Running Trainer To run a Trainer project you must specify the SSG file for each port on which you want to start Trainer Call the StartGenerationByPort function and specify the Trainer file board index and port index to start generation on the specified port For example if you have set port configuration to DEVICE_CONFIG_AT_AT_0 0 then call StartGenerationByPort for the first and second ports To stop generation call the StopGenerationByPort function for each port on which Trainer has started Use the following code to start and stop generation for ports O and 1 sessanta Set port configuration to DEVICE_CONFIG_T_T_A_A ySASAutomation SetPortConfiguration 0 88 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Set port configuration is done End If Spa sss Start first Generation on Port 0 ySASAutomation StartGenerationByPort E Projects AnalyzerTrainer Port one ssg 0 0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is started on Port 1 End If ii Start second Generation on Port 1 ySASAutomation Sta
13. E FE AE FE FE AE FE FE FE FE AE FE FE AE FE FE FE FE AE AE TE E FE EFE E EH SPEE 1 56 s INK D D Wr SPEE 3G 25 speed _LINK_SPEED_6_0 A ENE default FormatEx Sd speed Unknown D I return speed name FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE TE FE TE FE FE TE TE TE TE TE TE TE TE TE RH ERE EEE EEE EE HEE HEE HEH HEH HEHE This function returns the name of the channel where the current event occurred FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE EERE HE EEE EGE EEE HEE EEE ERE EEE EH HE HE HEH HEH HEHE GetChannelName channel in Channel channel_name select channel I1 TELT channel _T1 EE channel _12 ETZ channel _T2 pate channel _13 UT channel _T3 TS channel IA tae channel _T4 E ET channel _15 so BI channel _T5 KE channel _T16 Lens channel _T6 TG channel _17 EA channel _T7 LS E channel 8 E CIO channel _T8 MIS channel _T8 TOTZ channel _I9 TEU channel _T9 UTO channel _110 WILTON channel _T10 TIO channel _Ill EEIN channel _T11 TEI channel _I12 EXE channel _T12 TILA channel _113 HITS channel _T13 CRIST channel _114 eT Lats channel _T14 STL channel _115 DE Ee channel _T15 TILDA channel _I16 WETO T channel _T16 TEON channel Il TILIA channel
14. EE EE EEE HE EEE FE EE EE EEE EE EERE HE PRR RE ReportEvent Info report FormatEx TraceEvent 6s 04u Channel s Speed 4s Event Sa Time S y GetLevelName in Index GetChannelName GetLinkSpeedName GetEventName TimeToText in Time ReportText report ReportPrimEventInfo if in TraceEvent _FRM_PRIMITIVE report FormatEx Primitive packet value 0x X Count d n in Primitive in Count ReportText report 31 4 10 Loading Pre Emphasis Signal Settings You can load a previously saved pre emphasis signal setting file by calling the LoadPreEmphasisSignalFile function from the SASAnalyzer automation object to retrieve values from the specified file and load them into the connected board LS SSeS Load Pre Emphasis Signal File ySASAutomation LoadPreEmphasisSignalFile F ForTestATS sng If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is started End If 32 How to Contact LeCroy Type of Service Contract Call for technical support US and Canada 1 800 909 2282 Worldwide 1 408 727 6600 Fax your questions Worldwide 1 408 727 6622 Write a letter LeCroy Corporation Customer Support 3385 Scott Blvd Santa Clara CA 95054 Send e mail support lecroy com Visit LeCro
15. G_J_J_0_0 ySASAutomation SetPortConfiguration 0 68 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Set port configuration is done End If OE Assign FourthScenario of VTSE infdb library to the port 0 of board 0 ySASAutomation SetScenarioToPort 0 0 E Projects VTSE infdb FourthScenario If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Scenario is set to port 0 End If SH Assign ThirdScenario of VTS ySASAutomation SetScenarioToPort 0 1 I If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description infdb library to the port 1 of board 0 Projects VTSE infdb ThirdScenario Else MySTATS ReportText Scenario is set to port 1 End If n tart scenario on port 0 board 0 ySASAutomation StartScenario 0 0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Scenario is started on port 0 End If n tart scenario on port 1 board 0 ySASAutomation StartScenario 0 1 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Scenario is star
16. H EEE EE HE EEE HE HEHE EE EERE HERE RE SAS address value and related company name HEE R EEE EE HE EEE EE EE EEE HE AAA Get SASAddressString address_hi_dword address_lo_dword company_name GetIEEECompanyName address_hi_dword gt gt 4 OxOOFFFFFF company_name_str select company_name ne default Format Ss company_name Las 0xS08X 08X s n address_hi_dword address_lo_dword company_name_str return FormatEx Y HRT H 44 4 44 4 4 HEH 4 4 EE EEE TARA RATA RATA EE EEE RE EE HEE EE EEE RE EE This function returns SAS address value and related company name FREE 44 HEHE HE EEE HE HE EEE EE EEE EE EE EEE EE EE RE HE 4444444 EE ER EE EEE RE EE HEE EE HEE BE EE GetSASAddressString2 SASAddress Revert 32BitData Get SASAddressHi SASAddress Revert 32BitData Get SASAddressLo SASAddress address_hi_dword address_lo_dword return GetSASAddressString address_hi_dword address_lo_dword FREE E EHH EE EEE HH HE RARA EE EEE HE EE 444444 EE ER EE EE RE EE HR HE EEE RE EE This function reverts given 32 bit valus HPT H EEE EE EEE HE HE EEE HE EE RE EE HEE EE 446 444 HE 444444 EE ERE EE EEE RE EE HE HE EEE RHE EE Revert32BitData Data NewData Data lt lt 24 NewData Data amp 0xFF00 lt lt 8 NewData Data amp 0xFF0000 gt gt 8 NewData Data gt gt 24 amp OxFF Test FormatEx Data 0x 08X NewDa
17. ST Automated Test Suite User Manual Manual Version 1 00 Software Version 1 00 August 201 1 Document Disclaimer The information contained in this document has been carefully checked and is believed to be reliable However no responsibility can be assumed for inaccuracies that may not have been detected LeCroy reserves the right to revise the information presented in this document without notice or penalty Trademarks and Servicemarks LeCroy and ST Automated Test Suite are trademarks of LeCroy Microsoft and Windows are registered trademarks of Microsoft Inc All other trademarks are property of their respective companies Copyright Copyright O 2011 LeCroy All rights reserved This document may be printed and reproduced without additional permission but all copies should contain this copyright notice Contents 1 ureien EE A 1 1 Test Case Overview EE 4 EE ele Ge 4 2 Automated Test Suite Application Shell 5 2 2 Main Toolbar nnes eene na 6 23 WORKSPACE Ad rr ellenico policistico 8 2 4 Test Monitoring Console 9 2 5 SOUNUEWINGOW o RAIL LL iaia 10 267 ele 10 3 Operation of the Automated Test Suite Software nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn ennnen 11 4 Writing ATS VBSEHPIS eege 12 4 1 Creating the Main Objects 12 4 2 Specifying Port Configuration EE 14 4 3 Running the Analyzer and Capturing a Trace File ssooosssnneneeeneeennernrnneeeee 15 4 4 Running Host Emula
18. Tee T6 I T 6_ T 6_ x E I7_1 TEATS EA z 18 ER T Sc T F T Bi mer 8_1 19_ 19 1 T g wT 91 110 VETO TTO TL 0_1 I11 riiai TTI DELT 1 PRS HE TTS T12_1 113 118157 T13 TL3 1 W I 114 114 We T14 UTI Dax 115 MIS AE T15 UTI 5_1 I16 T16_ T16 UTI 6_1 117 TETAI 117 TI i 118 118_ W I T18 T1 8_1 119 MITO 1 T19 TI 9_1 120 12015 27 EH Get channel _T20_1 T20_1 channel _I21_1 Sa STR eta channel _T21_1 o gt ET Zt ihe channel _122_1 gS EDD ae channel _T22_1 oo MEZ ZA channel _123_1 E ENER channel _T23_1 de 2 53 Ss channel _124 1 E A sie channel _T24 1 to ECKER channel _125_1 y TR bee channel _T25_1 BIZ channel _126_1 IZA SL channel _T26_1 T26_1 channel _127_1 so LOZA GEAR channel _T27_1 LTS channel _128_1 Bo EZ Be ee channel _T28_1 T28_1 channel _129 1 Sr TRO ls channel _T29 1 PILI channel _130_1 I30_1 channel _T30_1 T30_1 channel _131_1 MIS channel _T31_1 T31_1 channel _132_1 GE channel _T32_1 SL A channel _133_1 I33_1 channel _T33_1 T33_1 channel _134 1 Bled ks channel _T34_1 TA channel _135_1 I35_1 channel _T35_1 T35_1 channel _136_1 I36_1 channel _T36_1 T36_1 default FormatEx d channel Unknown D I return channe
19. _0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Set port configuration is done End If 14 4 3 Running the Analyzer and Capturing a Trace File To run an Analyzer project and create a trace file you have two options The first one is Start Stop Recording and the second one is MakeRecording Using either option the captured trace file is stored in the Trace File Path specified in the Settings dialog The trace file name is the test name and is in a folder with a name similar to the device DUT name specified in the Configuration dialog Start Stop Recording You can start capturing by calling the StartRecording function using as input parameter the path of the Analyzer project ySASAutomation StartRecording E AnalyzerOnly sac If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Recording is started End If WScript Sleep 10000 Wait 10 seconds for our capturing process You stop recording by calling the StopRecording function after waiting enough time for the capturing process to complete The parameter specifies whether you want to stop capturing only or you want to create your trace file also The FALSE value creates a trace file ySASAutomation StopRecording FALSE If Err Number lt gt 0 Then MySTATS ReportError Err number Err
20. ecordingOptions out retval IDispatch recording_options HRESULT ResumeGeneration void HRESULT ActivateDevice in BSTR bstrFileName HRESULT DeactivateDevice HRESULT SetScenario ToPort in int nBoardindex in int nPortIndex in JBSTR bstrLibraryName in BSTR bstrScenarioName out retval int pnErrorCode HRESULT StartScenario in int nBoardIndex in int nPortIndex HRESULT StopScenario in int nBoardIndex in int nPortindex HRESULT SetPortConfiguration in int nBoardIndex in int nPortConfiguration HRESULT StartGenerationByPort in BSTR gen_file_name in int nUnitIndex in int nPortIndex HRESULT StopGenerationByPort in int nUnitIndex in int nPortIndex HRESULT GetTrainerExitCode in int nBoardIndex in int nPortIndex out retval BYTE pyTrainerExitCode HRESULT LoadPreEmphasisSignalFile inJBSTR bstrPreEmphasisSignalFile out retval BOOL pbRetval For detailed descriptions of these functions refer to the Automation API Reference Manual 4 2 Specifying Port Configuration After creating the SASAnalyzer and STATS automation objects specify the port configuration by calling the SetPortConfiguration function This function specifies the functionality for each port Refer to the Automation API Reference Manual for port configuration lists and their values Use the following code to set port configuration ySASAutomation SetPortConfiguration 0 72 72 is the code for DEVICE_CONFIG_AT_0_0
21. il SASTracer Close 21 Trainer Infusion sA SATSAS set port configuration to DEVICE_CONFIG_TJ_0_0_0 ySASAutomation SetPortConfiguration 0 80 aia Start lt a generation file gt ySASAutomation StartGenerationByPort E Projects TrainerOnly ssg 0 O nanni Assign scenario to port 0 board 0 ySASAutomation SetScenarioToPort 0 0 E VTSE infdb FirstScenario SR Start scenanio gt MySASAutomation StartScenario 0 O daa Stop Scenario MySASAutomation StopScenario 0 O ae RR Stop Generation MySASAutomation StopGeneration 0 O 22 4 9 VSE Verification After a trace file is generated and its trace object is accessed you can do VSE verification on that trace file Call the RunVerificationScript function with parameter the VSE script to verify the trace file based and return the result of verification The return value shows whether the result passes or fails 0 FAIL 1 PASS 2 Done Use the following code to run verification Open trace fil Set SASTracer MySASAutomation OpenFile C Cascading 3 Board scs If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Sample file is opened End If AS Run Verification with SASVS script VSEResult SASTracer RunVerificationScript C samp
22. ings dialog Figure 2 2 which provides access to user configurable options xl VB Scripts root directory Generated reports path TRAE a Trace files C Users Public Documents LeCroy SAS SATA Automated Test Suite Ou Ey VB Script Editor notepad exe ge Project files path C Users Public Documents LeCroy SAS SATA Automated Test Suite Exe si Automatically Save Log Documents LeCroy SA File Path C Users Public Documents LeCroy SAS SATA Automated Test Suite amp ATS working protocol SAS v Figure 2 2 VB Scripts root directory Specifies the folder in which to save VB scripts Generated reports path Specifies the folder in which to save reports Trace files path Specifies the folder in which to save trace file output during test execution VB Script Editor Specifies the application with which to open VB scripts Automatically Save Log To automatically save log files select the checkbox and enter the File Path and the Max imum Size in kilobytes Project files path Specifies the folder in which to save the project Automatically Save Log To automatically save log files select the checkbox and enter the File Path and the Max imum Size in kilobytes ATS working protocol Specifies SAS or SATA protocol 6 Configuration Button The Configuration button opens the Configuration dialog Figure 2 3 in which you can enter the DUT Name and then set the SAS Address and Speed 1 5 Gbps 3 0 Gbps 6 0 Gbps
23. ithin the Test Monitoring Console Pass Fail or N A is added to the Results column Error codes are added to the Description column 4 Writing ATS VB Scripts The most important and significant part of running an automation test is writing their VB Scripts You need to write your own VB Scripts for your automation tests and therefore you must understand how VB Scripts should be prepared NOTE Currently ATS does support segmented memory and auto run Auto run is an application feature which the user can implement in VB script 4 1 Creating the Main Objects You must create two main automation objects at the beginning of any VB Script The first one is the STATS object which sends test results reports and possible errors to the STATS environment The second one is the SASAnalyzer object which runs Analyzer Emulator Trainer InFusion and VSE projects To create automation objects call the CreateObject function LECROY is the name of the namespace that includes all LeCroy automation objects To create the STATS automation object use the following code in your VB Script Set MySTATS WScript CreateObject LECROY STATS If Err Number lt gt 0 Then WScript Echo STATS Creation Failed WScript Quit ELSE MySTATS ReportText My STATS started MySTATS ReportText STATS Automation object is created End If To create the SASAnalyzer automation object use the following code in your VB
24. le_ssp_protocol sasvs If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Run Verification finished End If on Se Report resul E El ySTATS ReportText VSE Result amp CSTR VSEResult If VSEResult 0 Then ySTATS ReportText VSE Result FAILED End If If VSEResult 1 Then ySTATS ReportText VSE Result PASSED End If If VSEResult 2 Then ySTATS ReportText VSE Result DONE End If 23 VSTools inc File of Verification Script Tools You should include the VSTools inc include file in all verification scripts This file contains important script functions and is a supplement to the Verification Script Engine API provided by the application It also has some useful examples dd Copyright c 1998 2005 LeCroy All Rights Reserved VSTools inc Verification Script Tools version 1 0 NOTE This file contains important script functions and is a supplement to the Verification Script Engine API provided by the application This file SHOULD be included in all verification scripts 4 4 4 4 4 4 4 44 EH EH HE EH HE HEE EE HE HE EE EE HEE EE EEE EE HE EE HE ERE EE HEE HE EEE RE EE include IEEE IEEECompanies inc Sinclude VS_Primitives inc Sinclude VS_constants inc HEHEHE HE HH EH HE EH EH HH HH
25. lyzer Trainer Analyzer Trainer 1 Port Analyzer Trainer 2 Ports Trainer Only and TrainerWithExitCode o Mixture Configurations such as AnalyzerDevicelnfusion AnalyzerHostDevice HostInfusion Targetinfusion TrainerInfusion See Chapter 4 Writing ATS VB Scripts 1 2 Folder Structure The ST Automated Test Suite application has its own folder structure These folders are at the top level o Examples Scripts Contains VB scripts o Reports Contains the generated reports o Output Default folder for saving trace files You can change the default folder in the Settings dialog 2 Automated Test Suite Application Shell The ST Automated Test Suite installs an application that initiates the test process and manages the test output Figure 2 1 ETA EE File Run Commands View Reports Help am Workspace 2 17 DIE Available VB Scripts Ga Trainer OG Target Emulator D Mixture Configurations D a Infusion O Host Emulator OG General D Analyzer gt m XAL STATS Test Result Detail E 108 LM E E E E E E Output x a Y E DI List of Available Tests Ready CAP NUM SCRL Figure 2 1 The software contains the following main parts o Main Toolbar o Workspace Area o Monitoring Console o Output Window o Menus 2 1 Main Toolbar RX Settings Button The Settings button at the left opens the Sett
26. or AutoSpeed for each Port number Configuration wl DUT Name Device 1 Find Device Port 1 SAS Address 0000000000000000 Speed AutoSpeed y Port 2 SAS Address 0000000000000000 Speed Autospeed y Port 3 SAS Address 0000000000000000 Speed autospeed y Port 4 SAS Address 0000000000000000 Speed AutoSpeed y Change SAS Address in Trainer scripts Change Speed in Trainer scripts Retry tests if they fail Lo _ conce Figure 2 3 Click the Find Device button to locate devices Help Button The Help button displays information about the application 2 2 Workspace Area The Workspace Area provides a nested tree structure that allows you to select individual tests to run Figure 2 4 Workspace 5 2 DIE Available YB Scripts a D Trainer DI Target Emulator DIE Mixture Configurations DIE Infusion DI Host Emulator D General Ga Analyzer E Di E Figure 2 4 This window lists all available tests Checkboxes allow selection of the entire suite or individual test cases Buttons After tests are selected the Add button adds test s to the execution pipe After tests are selected the Show VBS button or double clicking the test case name opens the VB script file in the Scripts Editor such as the Notepad application The Refresh Test list button refreshes the list of tests if tests have been added or modified within the Scripts folder
27. pt should complete its work 4 4 4 4 4 4 HEH HE HE EEE EE EEE EE EE EEE EE EEE HE EE EE EE EE ER EE EEE RE AHH ScriptFailed out Result _VERIFICATION_FAILED HARTA ATAR ROTAR This function specifies that the verification is done and the script should complete its work 4 4 44 EHH HE EEE HH HE 4 4 ATAR 446 ER EE 444444 EE ERE EE EEE RE EEE EE EE HEE RE EE ScriptDone out Result _VERIFICATION_PASSED FREE E EEE HE EEE HH EE EEE EE EEE HE EE EE EE EE HE EE EE EE 44444 HE EEE RE EH HE HE EEE RE EE This function returns the name of the level where the current event occurred 48 44 EHH HE EEE HE HE HEH EE EE EE EE EEE EE 46 444 EE 448444 44444 44444444444 EH HE EE EEE RE EE Get LevelName level in Level level_name select level _IDLE Tdle level _LINK Wank level _OOB_SEQ OOB_Seq level _TRANSPORT Transp level _ATA ATA level _SCSI WSC SI level _SMP SMP level _TASK TASK default FormatEx d level Unknown D I return Level name 4 4 FE E 4 EE HEHE HE HERE HE RAR EE AE EEE EE HE EE HE HEE EE RA EE RRR RE This function returns the name of the link speed where the current event occurred EH GetLinkSpeedName speed speed_name select in LinkSpeed spee speed LINK FE FEAE FE AE E FE AE FE FE FE FE AE AE FE AE FE FE AE HE AE FE AE FE FE AE FE FE AE FE AE FE FE AE FE FE AE FE AE F
28. rtGenerationByPort E Projects AnalyzerTrainer Port Two ssg 0 1 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is started on Port 2 End If ASS Sa Stop Generation on Port 0 ySASAutomation StopGenerationByPort 0 0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is stopped on port 1 End If Sexes Stop Generation on Port 1 ySASAutomation StopGenerationByPort 0 1 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Generation is stopped on Port 2 End If 17 If you have only one port for generation you can use another pair of starting and stopping generation functions which require no board or port index because Trainer can only be started on the single Trainer port Specify the Trainer port by the SetPortConfiguration function Use the following code a las Set Port Configuration to DEVICE_CONFIG_AT_0_0_0 ySASAutomation SetPortConfiguration 0 72 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Set port configuration is done End If POTES Start an generation file ySASAutomation StartGeneration
29. ta 08X An Data NewData ReportText Test return NewData 29 RevertRawByteOrder RawBytes RawSize RevertRaw RawByte RevertRaw RawSize 1 for index 1 index lt RevertRaw RawSiz for index 0 index lt Test Format RevertRaw index ReportText Test DN return RevertRaw FEE TE FE TE AE E FE E TE AE TE FE E E E E E EE E E E H EH This function returns high 4 4 44 4 4 4 4 4 4 4 4 Get SASAddressHi SASAddress return GetNBits SASAddress FE FE FE FE FE FE FE FE FE FE EEE TE FE FE FE EEE HEHE This function returns low FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE EEE HE HE H Get SASAddressLo SASAddress return GetNBits SASAddress FE TE FE FE 444 FE FE FE FE FE FE FE FE FE FE FE FE FE HE FE HE HE HE HE H This function Format raw b FE TE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE FE HE HE HE H H FormatRawBytes RawBytes sizeof RawBytes S GetNBits RawBytes 0 8 RawSize index index 1 NextNBits 8 RawSize index Data 0x 02X RevertedData 02X n r 4 44 44 4 44444 44444 444444 EEE GREE EEE HE EEE HEHE HEE dword of SAS address 4 44 44 4 44444 44444 4444 44444444 44444444 HEE HEE 327 32 4 44 44 4444444444 44444 EEE EERE EERE HE EEE HEH HEE dword of SAS address 444 44 4444 44444 4444 4444 444444444444 HEHE
30. ted on port 1 End If n top scenario on port 0 board 0 ySASAutomation StopScenario 0 0 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description 19 Else MySTATS ReportText Scenario is stopped on port 0 End If 5 2 Stop scenario on port 1 board 0 ySASAutomation StopScenario 0 1 If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Scenario is stopped on port 1 End If 4 7 Activating Device Emulator To activate deactivate Device Emulator projects call the ActivateDevice and DeactivateDevice functions from the SASAnalyer automation object using as parameter the device emulator project Use the following code to activate deactivate a device emulator APPEAR Activate a Target Emulator project ySASAutomation ActivateDevice E Projects DeviceOnly std If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Device is activated End If WScript Sleep 5000 PRA Stop recording and make trace fil ySASAutomation DeactivateDevice If Err Number lt gt 0 Then MySTATS ReportError Err number Err Description Else MySTATS ReportText Device is deactivated End If 20 4 8 Running Mixed Configurations Functionalities
31. tor o el 16 45 Running Mane date ege 17 4 6 R nno HFS ON nus dde 19 4 7 Activating Device Emulatori 20 4 8 Running Mixed Configurations FunctionalitieS 21 49 NSE ViehilCAlOMN EE 23 4 10 Loading Pre Emphasis Signal Geitngs e 32 How to Contact LeCroy ET 33 1 Introduction The ST Automated Test Suite is a turnkey verification system that allows developers to pre test devices for SAS SATA specification conformance The system generates specific traffic conditions to the Host or Device under Test DUT The Analyzer simultaneously records and analyzes responses The ST Automated Test Suite includes a software console that manages the entire compliance verification process by allowing users to run individual test cases or run the full suite in batch mode operation The ST Automated Test Suite operates on Sierra M6 4 Sierra M6 2 STX A6 4 and STX M6 1 platforms 1 1 Test Case Overview Each individual test case is controlled by a VB script that automates operation of the hardware and software The ST Automated Test Suite has Available VB Scripts o General such as PreemphasisLoad and VSE o Analyzer such as Multi Open Close Run Analyzer project Make recording and Run Analyzer project Start stop recording o Target Emulator such as Activate Deactivate and Analyzer Target o Host Emulator such as AnalyzerExerciser and HostOnly o Infusion such as Analyzer Infusion and Infusion o Trainer such as Ana
32. y web site http www lecroy com 33

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書    座安全に関する敵注意  Greenway GWF3 Use and Care Manual  Flashback X4 Delay – Manual  Vogel's PPC 110    Technical Service Data - Komatsu Forklift USA, Inc. v3.1  Horizon FCJJ-16  XML-Based Application Creation Getting Started Guide  

Copyright © All rights reserved.
Failed to retrieve file