background image

Computer Access Technology Corporation  

 

IB

Tracer

 Verification Script Engine Manual, version 1.0 

 
 

Page 27 of 35 

 

Before calling this function - in.Payload and in.PayloadLength are empty but some other 

retrieving functions can be used to receive all information about fields in link packets, packet headers 
and MAD decoded fields. 
 
 
 

15.2 IsMad()

 

Verifies that current event is MAD 

 

Format 

:     

IsMad()

 

Example: 

if( IsMad() )  DoSomething();  
 
 
   

16.  Packet Header retrieving functions 

 

 
This group of functions covers VSE capability to extract information about IB packet header fields. 
If the header is not present in the packet – all of those functions will return null-value ( see CSL 
Manual –for details about null-value ). 
 
 

16.1 GetLRHField()

Extracts information about LRH header field 

 

Format 

:     

GetLRHField (

lrh_fld

)

 

Parameters:    

  

lrh_fld        

-  LRH field identifier that can be one of the following values:

 

 

Identifier Meaning 

_VL   

Virtual Lane 

_LVER 

Link version 

_SL   

Service Level 

_DLID 

Destination LID 

_SLID 

Source LID 

_PLEN 

Packet length 

_LNH 

Link next header field 

 

 

Example:

 

 

val  = GetLRHField (

_VL

 ); # extract VL field from LRH header 

Summary of Contents for IBTracer

Page 1: ...Avenue Santa Clara CA 95051 1302 Tel 1 408 727 6600 Fax 1 408 727 6622 IBTracer Verification Script Engine User Manual IBTracer VSE Manual Version 1 0 For IBTracer Software Version 2 2 or Higher 1 Nov...

Page 2: ...events 14 7 1 PACKET EVENTS 14 7 2 NOTIFICATION EVENTS 15 8 Sending functions 15 8 1 SENDCHANNEL 15 8 2 SENDEVENT 16 8 3 SENDLINKPKT 17 8 4 SENDMAD 17 9 Timer functions 19 9 1 VSE TIME OBJECT 19 9 2 S...

Page 3: ...29 16 5 GETRETHFIELD 29 16 6 GETATOMICETHFIELD 30 16 7 GETATOMICACKETHFIELD 30 16 8 GETRDETHFIELD 31 16 9 GETRWHFIELD 31 16 10 GETPOSTHDRFIELD 31 17 MAD decoded fields retrieving functions 32 17 1 GET...

Page 4: ...B packet headers Link packets and MADs make very complex timing calculations between different events in recorded trace filter data in or out of the trace with dynamically changing filtering condition...

Page 5: ...tion Optional const MY_GLOBAL_CONSTANT 10 set g_MyGlobalVariable 0 OnStartScript It is a main intialization routine for setting up all necessary script parameters before running the script OnStartScri...

Page 6: ...ow specified message only one time no matter how many times ProcessData is called ShowStartPrompt ShowStartPrompt n Write the body of this function depending on your needs return Complete OnFinishScri...

Page 7: ...his document for full description of verification script input context variables 3 The ProcessData function which is present in all verification scripts then processes whatever event has been sent to...

Page 8: ...CATION_PASSED or _VERIFICATION_FAILED will complete the script run Call If expected event OnFinishScript Finishing VSE running Call PASSED FAILED DONE Verification Script results NOTE Verification scr...

Page 9: ...Running verification scripts from IBTracer To run a verification script over a trace run the command Report Run verification scripts from the menu or push the button shown below on the main toolbar if...

Page 10: ...Start running selected verification scripts Maximize dialog and expand output window This option if set clears up the contents of the output window when Run scripts button is pressed Save contents of...

Page 11: ...racer Verification Script Engine Manual version 1 0 Page 11 of 35 Right click in script list to open a pop up menu with options for performing additional operations over selected scripts Run verificat...

Page 12: ...ication instance Otherwise a new application instance will be launched for each script file This option if set allows editor applications to edit all included files extension inc along with main verif...

Page 13: ...for a specific events or after calling some functions filling out some of variables 5 2 1 All packet specific set of members valid for any packets but only after RetrievePktPayload function was called...

Page 14: ...ide that recorded trace does or not satisfy the imposed verification conditions In both cases the verification script will stop running If you don t specify any of those values the result of script ex...

Page 15: ...t list of packet events and value of in TraceEvent Notification event in TraceEvent Physical link woke up from silence _EVNT_CONNECT Physical link came to silence no physical signal _EVNT_DISCONNECT C...

Page 16: ...UC Unreliable Connection packets _PKT_UD Unreliable Datagram packets _PKT_SKIPS Skips _EVNT_CONNECT Physical link woke up from silence _EVNT_DISCONNECT Physical link came to silence no physical signal...

Page 17: ...ndLinkPkt 0x1 0x7 send all link packets with Opcode 0x1 and VL 0x7 SendLinkPkt _ALL 0x7 send all link packets with VL 0x7 8 4 SendMAD This function specifies more precise tuning for MAD packets Format...

Page 18: ...aving size more than 32 bits use raw binary values like 0011223344556677FF For more information about raw binary values please refer to CSL Manual Example SendMAD send all MAD packets equal to SendEve...

Page 19: ...ease see CSL Manual for more details about CSL types seconds nanoseconds NOTE The best way to construct VSE time object is to use Time function see below 9 2 SetTimer Starts timing calculation from th...

Page 20: ...unique timer identifier Return values Returns VSE time object from timer with id timer_id Example GetTimerTime Retrieve timing interval for timer with id 0 GetTimerTime 23 Retrieve timing interval fo...

Page 21: ...and MILLI_SECS are constants defined in VS_constants inc 10 2 TimeFromSymbols Constructs VSE time object by integer value presenting number of IB symbols Format TimeFromSymbols symbols Return values...

Page 22: ...rns VSE time object presenting time interval equal to subtraction of time_1 and time_2 Parameters time_1 VSE time object presenting first time interval time_2 VSE time object presenting second time in...

Page 23: ...value Example t Time 2 200 t1 DivTimeByInt t 2 returns VSE time object 1 sec 100 ns 12 Time logical functions This group of functions covers VSE capability to compare VSE time objects 12 1 IsEqualTime...

Page 24: ...time object presenting first time interval time_2 VSE time object presenting second time interval Example t1 Time 100 t2 Time 500 If IsLessTime t1 t2 DoSomething 12 3 IsGreaterTime Verifies that one...

Page 25: ...ext Format TimeToText time Return values Returns text representation of VSE time object Parameters time VSE time object Example t Time 100 ReportText TimeToText t see below details for ReportText func...

Page 26: ...unctions This group of functions covers VSE capability to retrieve information from the recorded trace 15 1 RetrievePktPayload Retrieves the packet payload inside the script and makes valid two input...

Page 27: ...ng functions This group of functions covers VSE capability to extract information about IB packet header fields If the header is not present in the packet all of those functions will return null value...

Page 28: ...n _P_KEY Partition Key _DESTQP Destination QP _A Answer bit _PSN Packet Sequence Number Example val GetBTHField _DESTQP extract DestQP field from BTH header 16 3 GetGRHField Extracts information about...

Page 29: ...at GetDETHField deth_fld Parameters deth_fld DETH field identifier that can be one of the following values Example val GetDETHField _Q_KEY extract QKey field from DETH header 16 5 GetRETHField Extract...

Page 30: ...p or Add Data bytes 0 3 _SWAPADDDATA_4_7 Swap or Add Data bytes 4 7 _COMPAREDATA_0_3 Compare Data bytes 0 3 _COMPAREDATA_4_7 Compare Data bytes 4 7 Example val GetAtomicETHField _COMPAREDATA_0_3 extra...

Page 31: ...NTEXT EE Context Example val GetRDETHField _EECONTEXT 16 9 GetRWHField Extracts information about RWH header field Format GetRWHField rwh_fld Parameters rwh_fld RWH field identifier that can be one of...

Page 32: ...bit field _RES_16 16 bit field Example val GetLRHField _RES_2 extract reserved 2 bit field from LRH header 17 MAD decoded fields retrieving functions This group of functions covers VSE capability to e...

Page 33: ...posedly existing in the MAD being processed Return Values If the field with the name asked is present in the current MAD function returns the hex value of the decoded field integer value if the length...

Page 34: ...bject specifying sleep time Example Sleep Time 1000 Don t send any event occurred during 1 microsecond from the current event NOTE Some other useful miscellaneous functions can be found in the file VS...

Page 35: ...The CATC software is licensed for use on a single personal computer The software may be copied for backup purposes only This warranty covers all defects in material or workmanship It does not cover a...

Reviews: