next up previous contents
Next: 3.4.2.2 Symbol Values of Up: 3.4.2 The Tool-Flow Previous: 3.4.2 The Tool-Flow

3.4.2.1 The Template Mechanism

Templates allow for the parameterization of parts of a given text. Several symbols -- embraced by pairs of ``<('' and ``)>'' -- stand for parts of a text which are to be replaced by the symbol's value during evaluation of the template. Examples 3.1 and 3.2 illustrate how this mechanism can be used to manipulate the input deck of MINIMOS-NT, and, therefore, enables an automated control of the simulator. Example 3.1 defines the template and its symbols. After assigning the values 3.0 and 1.5 to vdd and vg, respectively, the initial template results in the text depicted in Example 3.2.
\begin{Example}
% latex2html id marker 2784
\caption{
A template containing the ...
...textwidth}
\verbatiminput{listings/template-demo.txt}\end{minipage}\end{Example}


\begin{Example}
% latex2html id marker 2793
\caption{
The template after evaluat...
...
\verbatiminput{listings/template-demo-evaluated.txt}\end{minipage}\end{Example}

Templates can be defined in two ways, either they are given explicitly using a string which contains the template text, or by a reference to a file containing the template text. This means that the template defined by "diffuse temp=<(temperature)> time=<(time)>" is equivalent to a template defined by (file "~/recipies/anneal.cmd"), if the file "~/recipies/anneal.cmd" contains the text "diffuse temp=<(temperature)> time=<(time)>". Templates make it possible to give the simulation environment control over parts of the command line and the input decks of a simulation tool. Moreover, full transparency of simulation tool invocation is maintained.


next up previous contents
Next: 3.4.2.2 Symbol Values of Up: 3.4.2 The Tool-Flow Previous: 3.4.2 The Tool-Flow
Rudi Strasser
1999-05-27