CCS Standardfunction   Control [INT]
 

Control [INT]

Type [Str]

Condition [Str]

Description of Function

This function is used to implement program subroutines and loops in the PAV. The conditions supported are IF/THEN, IF/THEN/ELSE and WHILE. A subroutine is terminated by ENDIFor ENDWHILE respectively. The Control function must be invoked for every keyword.

Subroutines are limited to a single PAV table, i.e. all associated function calls and executable test lines must be contained within the same table.

Control lines must not contain any signal connections in the Stimulus columns. Alterations to the interface configuration within a Control construct may only be implemented in exceptional cases after consultation with the unit responsible for performing the test. There are complex rules to be observed in such circumstances.

If the condition is met, the Control function returns the result 1, if not the result is 0.

Subroutines may be nested.

Testing Points

None

Parameters

Type

Specifies the type of subroutine function. Possible options are the following:

IF

IF

Marks the start of a conditional subroutine. The test lines that follow (before the next ELSE or ENDIF instruction) are only executed if the condition returns the value 1.1

ELSE

Optional instruction; marks the start of the subroutine to be executed if the condition returns the value 0.

ENDIF

End of the subroutine

WHILE

WHILE

Marks the start of a WHILE loop; the test lines that follow up to the next ENDWHILE instruction continue to be executed until the condition returns the value 0.

ENDWHILE

End of WHILE loop.

BREAK

BREAK

This function can be invoked within a loop or a subroutine. If the specified condition is met, execution of the test stages within the loop or subroutine is terminated; the test is then continued from the line immediately following the ENDIF or ENDWHILE instruction.

Condition

Condition used to decide whether/which test stages within the subroutine are to be executed or when execution of a loop is to be terminated. The condition may included comparators and logical operators (but no calculations).

Numerical values within the condition are only allowed in Float or Integer format (decimal notation).

The following order of precedence applies to the execution of the condition: comparators before logical operators. A different execution sequence can be forced by the appropriate use of (round) brackets.

The following comparators are allowed:

==

Equal to

!=

Not equal to

>

Greater than

>=

Greater than or equal to

<

Less than

<=

Less than or equal to

The following logical operators are allowed:

&&

AND

||

OR

Example 1: IF/THEN

Control

IF,U1 < 5

Test lines to be executed if U1 < 5.

Control

ENDIF,

Example 2: IF/THEN/ELSE

Control

IF,(1 <= U2) && (U2 < 5)

Test lines to be executed if 1 <= U2 < 5.

Control

ELSE,

Test lines to be executed if U2 < 1 or U2 >= 5

Control

ENDIF,

Example 3: WHILE

Control

WHILE,U3<5

Test lines to be executed in a loop as long as U3 < 5.

Control

ENDWHILE,


Example 4: BREAK in a WHILE loop

The loop is prematurely terminated if U5 < 10.

Control

WHILE, U4 < 5

Test lines...

Control

BREAK, U5 < 10

Test lines...

Control

ENDWHILE,