next up previous contents
Next: B. Optimization Up: Dissertation Previous: 6.5 Result Database


A. Overview of the Input Deck Programming Language

The Input Deck Programming Language (IPL) is used as a parameter assignment and controlling language for several simulators and tools. The input deck is an ASCII file with a series of statements written in IPL syntax. In this chapter only a short overview of the syntax is given. A more detailed description is given in Appendix E of the MINIMOS-NT documentation [3].

In Figure A.1 a short example of an IPL sequence is shown. Comments can be written in C style useful for multi line text or in C++ style suitable for single lines. As in every programming language comments should be used frequently to make the code readable.

Figure A.1: Variable assignment, sections and inheritance in the Input Deck Programming Language.
/* 
 * a comment 
 */
 
// also a comment

aux v = 3. "m/s";  // initialization of an auxiliary variable

X {
   a = 5e-3 A;
   b = ~v;
  }

Y : X {
        a = 10.2 mA;
      }

In the first statement the auxiliary variable v is initialized with the value $3 \ {\rm m/s}$. Auxiliary variables are only visible within the IPL layer and can not be queried directly by the application. They are frequently used to simplify complex formulas.

Values can be for instance of the type boolean, integer, real or quantity. A quantity consists of a real value and a unit string (mA or if it is composed of several units it must be enclosed in double quotes "m/s").

For structuring the input deck file sections can be used. Sections group variables and subsections which are related to a specific topic. In the input deck file the data belonging to a section is enclosed in braces. In the example the section X consists of two variables, a which is simply initialized and b which is assigned with the formula v. Formulas are evaluated during runtime, so also formulas using internal variables of the program can be assembled. The name of the variable ~ v is an absolute addressA1 of the variable starting from the top level of the section hierarchy. Absolute or relative addressing is necessary if the variable is not in the local section. For relative addressing the circumflex (^ ) is used to step up one section (in the example also b = ^ v can be used).

Section Y inherits all variables and subsections from X (in the example only the variables a and b). Here the variable a is overwritten with the value $10.2 \ {\rm mA}$.

The invocation of the Input Deck Programming Language from a program is done by calling an initialization function with an input deck file. The library checks the syntax in the input file and inserts the statements in a database. This database can be queried during the rest of the program.



Footnotes

... addressA1
The variable b has the absolute address ~ X.b.

next up previous contents
Next: B. Optimization Up: Dissertation Previous: 6.5 Result Database

R. Plasun