Next: Technical Notes
Up: Adding models
Previous: Adding models
  Contents
Subsections
This section is a first cut at documentation. If you actually want to
install a model, please ask for more information. Your questions will
help me write the more complete documentation. (aldavis@ieee.org)
To create a model using this method, you create one file, with the
extension .model. A separate program, modelgen processes
this file to generate the appropriate .cc and .h files.
The resulting files are equivalent to the subcircuit method of
creating models.
There are two primary sections, device and model. Most
models have both, but a device can use several different models
as long as they are derived from a common base and designed to work
together. It is standard practice to share like this. For example,
all of the MOS models use the same device section.
Any model can inherit from another model, thus reducing
the need for repetition when code or parameters are the same in
different models, and allowing several to use the same device
section.
This model compiler has restrictions that will be removed in future
releases. Not all device types can be fully done with it, due to
missing features. Often, it is necessary to finish the job manually.
In this release (0.29), the diode fully uses it, but not the way I
want to. The MOSFET uses it for the model section but not the device
section. The sections h_direct and cc_direct exist
primarily to overcome this problem. Code placed here is simply copied
out.
- parse_name
- This is the name of the device, to be recognized by the parser.
Example: diode.
- id_letter
- This is the letter used to identify the device, when the parse_name is omitted. Example: D identifies a diode.
- num_nodes
- This is the number of nodes the device presents to its users.
Example: a diode has 2 nodes, regardless of what model is used
internally.
- circuit
- This is a section containing a netlist representing the internal
structure of the device. See the section Circuit subsection for
details.
- tr_probe
- This is a section containing a list of internal probes to be made
available to the user. See the section Probes subsection for
details.
- device
- This is a section describing the non-shared data relating to the
device. Information here is unique to this device. It is primarily
state information. See the section Device subsection for
details.
- common
- This is a section describing the shared data relating to the device.
Information here may be shared between similar devices. It is
primarily information that is read from the circuit description. See
the section Common subsection for details.
- eval
- There may be any number of eval sections, which are specific
evaluators for internal elements. See the section Evaluators
for details.
The following sections are incomplete. Please ask if you are
installing a model and need the information.
- base
- The keyword BASE is used as a flag to say this is a base for
other models. When the base flag is set, others can be derived from
it and used interchangeably with the same device type.
- level
- When several models are derived from a base, the numeric level is used
as a parameter to select which one to use.
- root
- This is the type of device that this model attaches to.
- inherit
- The model being defined inherits from the named base model.
- keys
- This is a list of the keywords that are used to identify the model,
and assign attributes. See the section Keys subsection for
details.
- independent
- This is a section describing parameters that are not dependent on size
or temperature. See the section Independent subsection for
details.
- size_dependent
- This is a section describing parameters that are dependent on size.
See the section Size_dependent subsection for details.
- temperature_dependent
- This is a section describing parameters that are dependent on
temperature. See the section Temperature_dependent subsection
for details.
- tr_eval
- This is a section containing evaluation code for the whole device.
See the section Tr_eval subsection for details.
The following sections are incomplete. Please ask if you are
installing a model and need the information.
Next: Technical Notes
Up: Adding models
Previous: Adding models
  Contents
Al Davis
2001-06-30