beautypg.com

2 ptracevar( ) : parser trace variable, Ptracevar( ) : parser trace variable, Ptracevar – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 132

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

123

10.20.2 PTraceVar( ) : Parser Trace Variable

Format

PTraceVar( var1, var2

, …> )

Parser Trace Variable outputs the values of the supplied comma-separated variables. Numeric
variables are output in decimal and hex format. Packet variables are output in byte streams (hex).
This primitive does not accept constants or data patterns, which generate parse errors.

Note: Numeric variables are DWORDS.

Example


51:

packet

GenericData

52: {
53: DATA : *
54: }
55: GenericData $XYZ { DATA = {

00 11 00 11 00 11 00 11

} }

56: global_var =

7

57:

Main

58: {
59: local_var =

12

60: PTraceVar ( global_var, local_var, $XYZ )
61:

Send

$XYZ

#Send $XYZ with the following data for the instance.

62: {
63: Data = {

AA BB CC DD

}

64: }
65: PTraceVar ( $XYZ )
66:

# Modify the value of $XYZ.

67: $XYZ { DATA = {

EE FF 00 11

global_var local_var } }

68: local_var =

777777

69: PTraceVar ( $XYZ, local_var )
70:

Send

$XYZ

# Send $XYZ.

71: PTraceVar ( $XYZ )
72: }

Output Window:

- Parsing started: File: C:\Sample_PTraceVar.usb3g. Operation Starts at time 09:29:17 AM-
Parsing... c:\sample_ptracevar.usb3g
GLOBAL_VAR = 7 (hex: 0x7)

PTraceVar( global_var, ) from line 60

LOCAL_VAR = 12 (hex: 0xC)

PTraceVar( …, local_var, ) from line 60

$XYZ = {00 11 00 11 00 11 00 11} - 8 byte(s)

PTraceVar( , $XYZ ) from line 60

$XYZ = {00 11 00 11 00 11 00 11} - 8 byte(s)

PTraceVar( $XYZ ) from line 67

$XYZ = {EE FF 00 11 07 0C} - 6 byte(s)

PTraceVar( $XYZ, ) from line 69

LOCAL_VAR = 777777 (hex: 0xBDE31)

PTraceVar( , local_var ) from line 69

$XYZ = {EE FF 00 11 07 0C} - 6 byte(s)

PTraceVar( $XYZ ) from line 71

Parsing is done... C:\Sample_PTraceVar.usb3g - 0 error(s)
C:\Sample_PTraceVar.usb3g - Generation Blocks : 1, Total number of instructions : 2
- Parsing Finished: File: C:\Sample_PTraceVar.usb3g. Operation ends at time 09:29:17 AM -