Model Tag

Every component that is used in Mason must have a model declaration, including simple primitives. The model declaration defines the alias to be used in the network description and provides some basic information about the component. Every alias should be unique. Note that the following terms may not be used as aliases:

    • calculation

    • flag

    • frequency, freq

    • model, mod

    • optimization

    • output, out

    • port

    • solve, sol

    • statistics, stat

    • variables

Two fundamental models exist with different file formats, Touchstone and primitive models.

Tag for Touchstone Models

At a minimum, a Touchstone model declaration will describe an alias and a file location:

<model alias = “antenna”>

<file name = “antenna1.sp”></file>

</model>

Multiple files can be associated with an alias. This is generally done to optimize over a range of components (see aggregated). If multiple files are associated with an alias, which files gets used is a parameter that is added in the circuit description.

<model alias = “match”>

<file name = “match1.sp”></file>

<file name = “match2.sp”></file>

</model>

The file does not have to be in the same directory as where Mason is run. The user can specify a path with the filename. To keep Mason files portable, avoid using paths that start in the root directory (“c:\bin\touchstone\networks\match1.sp”).

When Mason is run, default paths can be provided. Mason will first start searching the run path; if it cannot find the file it will try the default paths in the order they are listed in “paths.txt”. If the location of paths.txt is not in the working directory, it can be declared using the -p command.

Assume paths.txt includes: “c:\bin\touchstone\” (no quotes, and the trailing slash is important). If Mason were run from “c:\mason”, then (using the previous example) first “c:\mason\match1.sp” would be tried; if that file did not exist, then “c:\bin\touchstone\match1.sp” would be tried.

The direction of the slash in the path (which differs between Windows and Linux file systems) is automatically fixed.

<model alias = “match”>

<file name = “networks/match1.sp”> okay

<file name = “networks\match2.sp”> okay

</model>

Tag for Primitives

Primitives are arranged conceptually in toolboxes, with specific models grouped by some form of relation. However, in an effort to keep primitives as extensible as possible, in practice these primitives are relatively simple XML files and the “toolbox” is really the folder the model is in. The location of these folders is defined in paths.txt, and the root directory is generally called mason_models.

A primitive can be any device whose S--Parameters can be defined by equations, given some number of arguments. Like Touchstone models, the path that stores the primitive library should be provided as an argument when Mason is run. Also, the path slash is automatically fixed. Unlike Touchstone, only one primitive model can be assigned to an alias. Any additional file name will simply be ignored.

<model alias = “transmission_line”>

<file name = “simple_tline/tline.xml” />

</model>

Copyright 2010, Gregory Kiesel