In this Topic Hide
Models for discrete devices and for integrated circuit processes come from a variety of sources and are often designed for particular simulators, in particular, PSpice and Hspice. These simulators are not generally compatible with each other so it is not easy for SIMetrix to be simultaneously compatible with both. Further, SIMetrix itself needs to retain backward compatibility with its own earlier versions.
An example of conflict can be found with the standard diode. The SIMetrix diode with no level parameter specified is mainly compatible with PSpice. But the standard Hspice diode is quite different and not compatible. The SIMetrix Level=3 diode is however compatible with Hspice both for level=1 and level=3. To use Hspice level=1 diode models the user has to edit the model so that level is changed to 3.
It is not always convenient to modify model files and for this reason SIMetrix provides an alternative in the form of the device configuration file. This provides a means of changing the access to particular device model including re-mapping level numbers. The following section describes how to setup a device configuration file.
The device configuration file (DCF) edits or adds to an internal table used to map model names, level numbers and access letters to an actual device model. All device models (that is the binary code that implements the device equations) have an internal name that is used to uniquely identify it, but this name is not used externally. Instead .MODEL statements use their own name (e.g. nmos, pnp) coupled with an optional LEVEL parameter to define the actual device referred to. For example, the MOS level 3 device is referred internally as "MOS3" but the .MODEL statements use the names NMOS or PMOS and set the LEVEL parameter to 3. The mapping between NMOS and LEVEL 3 to "MOS3" is defined in an internal table which can be modified by specifying a device configuration file.
The DCF can add new entries to the table so providing additional methods of accessing a device. It can also modify existing entries to point to a new device.
The device configuration file (DCF) path and name are defined by the option variable DevConfigFile. By 'option variable', we mean the variables assigned using the command line Set command not simulator options set by .OPTIONS.
The default value for the setting is %SHAREPATH%/DeviceConfig.sxdcf, %SHAREPATH% resolves to the support directory under the installation root.
Each line in the DCF maps a single device and consists of up to 4 assigned parameters. These are described in the following table.
Keyword | Description |
---|---|
ModelName | Model name used in .MODEL statement |
Device | Internal device name. See table |
Level | Level parameter |
Letter | Device letter |
Report | Value on or off. If on a report of the device mapping will be displayed in the command shell when SIMetrix starts. |
ModelName=D,Level=1,Device=Diode3 |
The above would make level 1 diodes use the same model as level=3. Here is another example:
ModelName=R,Level=0,Device=HspiceRes |
Level=0 is the level value when the LEVEL parameter is not specified. In the case of resistors, no .MODEL statement is required at all, so the above line will change the default model used for all resistors to the Hspice model instead of the native SIMetrix model.
It is also possible to add a new mapping in which case the level and modelname parameters must be currently unused. Also when creating a new mapping the 'Letter' parameter must be specified. 'Letter' is the first letter of the component reference traditionally used to identify the type of device in SPICE netlists. For example 'Q' refers to BJTs and 'D' refers to diodes.
For example, the following entries define LEVEL=69 as a valid level for accessing the PSP 1.03 model:
ModelName=nmos,Level=69,Device=psp103_n,report=on |
ModelName=pmos,Level=69,Device=psp103_p,report=on |
Note that two entries are required in order to support both n-channel and p-channel devices. The above doesn't change the existing level but adds an additional level.
When defining a new mapping the letter must be specified and usually this should be the letter conventionally used for the class of device. If defining a new mapping for a MOSFET, the letter 'M' should be used, for a diode the letter 'D' should be used and so on. However, the letters, 'N', 'P', 'W', 'U' and 'Y' maybe used as well for any type of device.
A list of all internal devices may be obtained using the show_devices script. This will copy to the system clipboard a tab delimited table listing all internal devices. This is guaranteed to be accurate as it is generated directly by SIMetrix. To obtain this table proceed as follows:
show_devices |
Some internal devices have a model name beginning with '$$'. These device do not use a .MODEL statement and have no model parameters. The name is used internally only.
Devices with a minimum number of terminals of -1 do not have a minimum number. Similarly devices with zero maximum number of terminals do not have a maximum.
|