4.15.2. File format

The following are typical ToolConf database lines:

TagA=ValueA
TagA=NewValue
Othertag
Othertag=Othervalue
;; Lines starting with ; (semicolon) are comments.
; Tag=Value

The first line creates a tag in the ToolConf called TagA, with value ValueA.

The second line has no effect, as TagA already has a value.

The third line creates a tag called Othertag, with no value.

The fourth line gives the value Othervalue to Othertag.

There must be no whitespace at the beginning of database lines, in tags, in values, or between tags or values and the = symbol.

Conventionally, ordinary comments start with two semicolons. Lines starting with one semicolon are usually commented-out lines. You can comment out a line to disable it, or uncomment a commented-out line to enable it.

A comment must be on a line by itself.

File header

If you add any ToolConf files, the first line of the file must be:

;; ARMulator configuration file type 3

ARMulator ignores any .ami or .dsc files that do not begin with this header.

Tree structure

Each tag can have another ToolConf database associated with it, called its child. When a tag lookup is performed on a child, if the tag is not found in the child, the search continues in the parent, and if necessary in the parent’s parent and so on until the tag is found.

This means that the child only includes tags whose values are different from those of the same tag in the parent.

If child databases are specified more than once for the same parent, the child databases are merged.

Specifying children

There are two ways of specifying children in a ToolConf database.

One is more suited to specifying large children:

{ TagP=ValueP
TagC1=ValueC1
TagC2=ValueC2
}

This creates a tag called TagP, with the value ValueP, and a child database. Two tags are given values in the child.

The other is more suited to specifying small children:

TagP:TagC=ValueC

This creates a tag called TagP, with no value. TagP has a child in which one tag is created, TagC, with value ValueC. It is equivalent to:

{ TagP
TagC=ValueC
}

Conditional expressions

The full #if...#elif...#else...#endif syntax is supported. You can use this to skip regions of a ToolConf database. Expressions use tags from the file, for example, the C preprocessor sequence:

#define Control True
#if defined(Control) && Control==True
#define controlIsTrue Yes
#endif

maps to the ToolConf sequence:

Control=True
#if Control && Control=True
ControlIsTrue=Yes
#endif

A condition is evaluated from left to right, on the contents of the configuration at that point. Table 4.8 shows the operators that can be used in ToolConf conditional expressions.

Table 4.8. Operators in ToolConf preprocessor expressions

OperatorExampleDescription
noneTagTest for existence of tag definition
==Tag==ValueCase-insensitive string equality test
!=Tag!=ValueCase-insensitive string inequality test
(...)(Tag==Value)Grouping
&&TagA==ValueA && TagB==ValueBBoolean AND
||TagA==ValueA || TagB==ValueBBoolean OR
!!(Tag==Value)Boolean NOT

File inclusion

You can use the #include directive to include one ToolConf file in another. The directive is ignored if it is in a region which is being skipped under control of a conditional expression.

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI0058D
Non-Confidential