Identifiers

Top  Previous  Next

Each object in the physical system (processors and wires) and in your application (tasks and connections) has a unique identifier. This is used by the configurer in error reports, and is also used to specify relationships between the objects. For example, a wire run between links on two named processors. Identifiers for objects in the configuration language are simply sequences of letters, digits and the special symbols underline _ and dollar sign $. The sequence must start with a letter.

 

identifier           = letter, {identifier character};

identifier character = letter | digit | "$" | "_";

letter               = "A" | … | "Z";

 

Some examples of valid identifiers follow. Note that the configurer would treat all the last three examples identically, because the case of letters is not significant.

 

proc_5

do$work

root

a_very_long_name

A_Very_Long_Name

A_VERY_LONG_NAME

 

Part of the syntax of each of the configuration language statement types which declare an object is the identifier that is to be used to refer to that object in later statements. For example, the identifier given to a processor is used again in placing tasks on that processor or in wiring the processor's links to those of other processors.

 

It is sometimes convenient, when an object will not be referred to later, to allow the configurer itself to choose an identifier for an object rather than for you to invent meaningless identifiers for every object. The declaration statement types all allow a question mark to be used in place of an identifier.

 

new identifier = identifier | "?";

 

Declarations of processors and tasks almost always require an explicit identifier to be used, as these identifiers are used later when placing the tasks onto the network of processors.

 

An example of using the question mark form of identifier would be as follows:

 

wire ? root[MYLINK:0] second[MYLINK:3]

 

This statement declares a wire running from link number 0 on processor root to link number 3 on processor second. Both links are of type MYLINK. The configurer reports errors about this wire by reference to the line number and file name of the declaration, but you are not able to refer to the wire again.