OpenSTA logo OpenSTA SCL Reference
Variables

Variables

The SCL language makes use of variables for temporary storage of data at script run time. Variables are given unique names that fulfill the requirements of an OpenSTA Dataname.

All variables accessed by a Script must be predefined in the DEFINITIONS section of the Script. If a variable that has not been defined is used in the CODE section, then a compilation error will be given.

Part of the definition of a variable assigns that variable a type of data it may contain. OpenSTAs SCL has just 2 basic types of data: integers and characters. All integer variables are initially set to zero, and character variables are empty, unless otherwise specified in their definition.

Both of the above data types may be specified as arrays allowing a single variable name to contain many indexed items of that type. A variable can also be pre-assigned values such that those values can be cycled through or randomly chosen - the values can be specified in the defintions section or be pulled from a file.

A variable may be accessed by more than just the specific instance of the Script it is running in, this is controlled by specifying a variable scope in its definition.

There is a further type of variable available that has a specific use, this is a TIMER and is purely used for making named timings of specific areas of code.

To allow the use of named bits of data, that don't need to change throughout the script run, there exist CONSTANT definitions. These are similar to variables but may not have their contents altered and can therefore be handled more efficiently.


<<<
prev page
^^^
section start
>>>
next page