This document contains a description of the CATC’s Verification Script Engine (VSE) – a new
feature in the IBTracer software that allows users to create custom tests on Infiniband(IB) traffic,
recorded on CATC’s Infiniband protocol analyzers.
The VSE conveniently allows users to ask the IBTracer application to send some of desired
“events” ( packets and some predefined notifications ) that occurred in the recorded IB trace to a
special verification script written using CATC script language. The script then evaluates the sequence
of events (timing, data or both) in accordance with user-defined conditions.
Using the VSE API, users can easily retrieve information about any field in IB 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 conditions, and display all
interesting information in the special output window.
2. Verification Script Structure.
A varification script file should have extension *.dec, and be located in the subfolder
..\Scripts\VFScripts of the main IBTracer folder. Some other files might be included in the main script
file using directive %include. (see CATC Script Language (CSL) manual for details)
The following schema can present the common structure of verification script:
############################################################################################
#Module info
#
############################################################################################
#Filling of this block is necessary for proper verification script operation...
#
############################################################################################
set ModuleType= "Verification Script";# Should be set for all verification scripts
set OutputType= "VS";# Should be set for all verification scripts
set InputType= "VS";# Should be set for all verification scripts
set DecoderType = "<Your VScript name>";# Should be set for all verification scripts
set DecoderDesc = "<Your Verification Script description>"; # Optional
######################################################################################
# Specify in the body of this function initial values for global variables#
# and what kind of packets or trace events should be passed to the script.#
# ( By default, only MAD packets and Link state change events from both channels#
#will be passed to the script.#
##
#For details – how to specify what kind of events should be passed to the script#
#please see the topic ‘sending functions’.#
##
#OPTIONAL.#
######################################################################################
# Uncomment the line below - if you want to disable output from
# ReportText()-functions.
#
# DisableOutput();
######################################################################################
# It is a main script function called by the application when the next waited event#
# occured in the evaluated trace.#
##
# !!! REQUIRED !!! – MUST BE IMPLEMENTED IN VERIFICATION SCRIPT#
######################################################################################
##
ProcessData()
{
#
# The function below will show 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 …
######################################################################################
# It is a main script function called by the application when the script completed#
# running. Specify in this function some resetting procedures for a successive run#
# of this script.#
##
#OPTIONAL.#
######################################################################################
3. Interaction between IBTracer and verification script
The following describes how IBTracer interacts with a verification script to test an open trace:
1. When a verification script is run, VSE looks for the function OnStartScript() and calls it if it is
found. In the OnStartScript() function, setup routines can be created that can perform tasks such
as specifying what kind of trace events should be passed to the script, and setting up initial
values of global script-specific global variables.
2. VSE then goes through the recorded trace and checks if the current packet in the trace meets
specified sending criteria – if the criteria are met, VSE calls the script’s main processing
function ProcessData() and provides input context variables to the script about the current
event. (Please refer to the topic “Input context variables” below in this 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 the script and verifies that the information in the event is appropriate for
the current stage of the verification process. At the completion of each stage, the ProcessData()
function determines if VSE should continue running the script or not. If the result for any given
stage of the script is clear, the script tells VSE to complete execution of the script.
The decision to terminate the test prior to evaluating the entire trace is controlled by the
output context variable: out.Result = _VERIFICATION_PASSED or
_VERIFICATION_FAILED.
(Please refer to the topic “Output context variables” below in this document for full description
of verification script output context variables)
4. When script running is finished, VSE looks for the function OnFinishScript() and calls it if it is
found. In this function some resetting procedures can be done.
The following picture describes the interaction between the IBTracer application and the running
verification script:
NOTE: Verification script result : <DONE> means that the script is intended solely for
extracting and displaying some information from recorded traces and that the user does not
care about the result . To specify that your script is intented only for the purposes of
displaying information, call somewhere in your script ( in OnStartScript() – for instance )
function ScriptForDisplayOnly() )