Teledyne LeCroy USB Protocol Suite User Manual (Voyager_Advisor T3_Mercury) User Manual
Page 362

Teledyne LeCroy Corporation
Creating a Script using the Script Editor
362
USB Protocol Suite User Manual
# REVISION HISTORY:
#######################################################
3. Add a comment line by starting the line with #:
# INCLUDE FILES:
4. To include main definitions and templates, add an include file line:
%include "Include\FrameworkLib.ginc"
5. Add constants:
Const EndpointNum = 1
Const DeviceNumber = 1
6. Add data patterns:
DataPattern SetAddrReq = { 00 05 00 00 00 00 00 00 }
7. Add frame and structure templates:
struct DeliveryID
{
Sel : 1 = 1 # Stream Index
Val : 3
}
8. (optional) Add global variables.
9. (optional) Add generation settings.
10. Add the Main generation procedure, such as the following example:
Main
{
# Place your generations instructions here.
SetLinkState (LinkState = U0)
Call GetDescriptor(EndpointNum,0,DEVICE_DESC,0x00,
0x00,0x1200,WaitTPSleep,WaitDPSleep)
Call SetAddress(EndpointNum, DeviceNumber * 256,
WaitTPSleep, WaitDPSleep)
}
Note:
You can use the Text Snippets on the left Text Snippets panel to add commands and their
parameters.
11. Add other generation procedures (see
). For how to set up
other generation procedures, see Appendix A of the Voyager USB 3.0 Exerciser
Generation Script Language Reference Manual.