Sundry Topics

In this topic:

.LIB Control

The .LIB netlist control allows the local specification of model library for a particular circuit.

Syntax:
.LIB pathname
pathname File system path name specifying a single file or, by using a wildcard (* or ?), a group of files. If the path name contains spaces, it must be enclosed in quotation marks (").

This control specifies a pathname to be searched for model and subcircuit libraries. Any number of .LIB controls may be specified and wild-cards (i.e. * and ? ) may be used.

If a model or subcircuit is called up by a device line but that definition was not present in the netlist, SIMetrix will search for it in files specified using the .LIB control.

SIMetrix also supports another form of .LIB used by model files designed for Hspice ®. See the Simulator Reference Manual/Command Reference/.LIB/Hspice Form for details.

Drag and Drop to Schematic

You can install a model file to a schematic by picking it up in windows explorer and dropping it onto the schematic window. This will insert a .LIB control (see above) with a path to the file you dropped. This installs the model file to be local to that schematic.

Library Diagnostics

When enabled, library diagnostics display messages showing the progress of the location of device models. To enable/disable select File > Options > General... then Model Library tab.

Local Models

You can also enter a model or subcircuit definition in the schematic's F11 window. However if you enter a model in this manner it will only be available to that schematic.

Library Indexing Mechanism

This is a technique used to speed the search for models and subcircuits. It is completely transparent and requires no action from the user. SIMetrix creates an index file for each library specification it encounters either installed globally or referenced using .LIB. This index files contain details of the file locations of models and subcircuit definitions referenced by the library specification. These index files can then be used for later simulation runs to speed the search for models and subcircuits. Index files are automatically rebuilt if any of the library files referenced are modified. (Modifications are detected by comparing file dates). All index files are stored in

app_data_dir/INDEXES

where app_data_dir is the location of the application data directory. See Application Data Directory for the location of this directory. The files are named SXn.sxidx, where n is some number.

Note that if you add a new model file to a directory while SIMetrix is running, SIMetrix won't know of the new file and any relevant indexes won't be updated. In this situation, select the menu File > Model Library > Rebuild Catalog to update the indexes.

Duplicate Model Names

Models of some common parts are available from different sources. Sometimes these have different names, e.g LF356 and LF356/NS - the latter available from the National Semiconductor library. In some cases the model names from different sources are identical. This poses a problem as models have to be uniquely identified by their name.

SIMetrix has a built-in utility that can automatically rename models with duplicate names. The devices are renamed by adding a user specified suffix to the model name. The rename utility is not accessible via the menus but must be invoked by typing a command at the command line. Proceed as follows:

  1. First ensure that all the model library files you wish to process are installed as global libraries.
  2. Make backup copies of your model files. This is optional, the utility makes backups anyway.
  3. Type the following at the command line. The command line is the edit box at the top of command shell. If this is not visible, select menu View > Show Command Shell:
    rename_libs
  4. A list of currently installed libraries will be displayed. Double click on any that you wish to be processed for renaming and supply a suffix. The suffix must not contain spaces and should start with a non-alphanumeric character such as '/' or '-'. Note that only models found to have duplicates will be renamed. SIMetrix will not rename unique models. If you do not supply a suffix for a library, no devices within it will be renamed.
  5. Press OK. The operation can take a long time; possibly a few minutes if the library is large. On completion the message:

    *** RENAME COMPLETE. See ???/RENAME.LOG for details

    will be displayed in the command shell. The RENAME.LOG file will contain full details of the rename process. This includes details of all models that were renamed.

Notes

  • If the device being renamed is implemented as a subcircuit, the rename utility will copy any symbol/model association for that device with the new name.
  • Devices that are used locally, i.e. within the model file itself, will be excluded from the rename procedure. These devices will not be renamed nor will they added to the list that is searched to identify duplicate names.
  • You can perform a test run which creates the log file but does not actually perform the renaming. To do this, type the command:

    rename_libs_check

    Note that messages output to the log file and to the command shell will report the renaming of models but no renaming will actually take place.

Using LTspice® Models

SIMetrix can use some models developed for LTspice®. This is especially useful for simulating some Op-amp models that are only available with LTspice®. Note that only unencrypted text format models may be used with SIMetrix.

A script is available which will build a SIMetrix symbol library from the LTspice® symbol/model library. Models can then be placed on a schematic from the menu Place > From Symbol Library using the LTspice category.

To run the script, type at the command line

ltspice_build_symbol_library

then follow the instructions.

Many models will run without modification and without any special settings. A few models use features that need to be explicitly enabled. For those models add the following setting:

In the simulator:
.OPTIONS LTspiceCompatibility=1

Some models need some minor modifications before they will run successfully. A few need more major modifications. If you have current maintenance, contact technical support for assistance.