beautypg.com

13 include command, Include command, Addressspace – Teledyne LeCroy PETrainer Scripting Language Reference Manual User Manual

Page 75

background image

Teledyne LeCroy

PETrainer Scripting Language

70

13 Include Command


This command includes the PETrainer™ script file inline. All commands in the included file are executed,
with the exception of the Config = General command.

The format of this command is following:

Include = <file_path>


where file_path is a path to the file to be included. If file_path is not a fully qualified path, then the
relative path to the current script file would be used.


Example 1:

In this example, all commands from the included1.peg file would be executed first, then all commands
from the included2.peg file would be executed, and then the 32-bit Memory Read TLP would be sent.

Include = "included1.peg" ; All packets from included1.peg file

; would be inserted here.

Include = "included2.peg" ; All packets from included2.peg file

; would be inserted here.

Packet = TLP ; Sending 32-bit Memory Read TLP request
{

TLPType = MRd32 ; Memory Read request (32 bit)

TC = 0x7 ; Traffic class is 7.

TD = 0x1 ; TLP digest is present.

EP = 0x0 ; TLP is not poisoned.

Address = 0x1000 ; Reading from address 1000h of memory space

Length = 0x40 ; Reading 40h DWORDs

}



Example 2:

The first command of this example includes all commands from the file c:/Testing/included1.peg.
If we assume that the current script is located in the folder c:/Testing/TLP, then the second command of
this example includes all commands from the file c:/Testing/TLP/included2.peg.
If we assume that the current script is located in the folder c:/Testing/TLP, then the third command of this
example includes all commands from the file c:/Testing/included3.peg.

Include = "c:/Testing/included1.peg"; All packets from included1.peg

; file would be inserted here.

Include = "included2.peg" ; All packets from included2.peg

; file would be inserted here.

Include = "../included3.peg" ; All packets from included3.peg

; file would be inserted here.