.LIB

There are two forms of .LIB and the behaviour of each is completely different from each other. The SIMetrix Native Form specifies a file or group of files to be searched for any model or subcircuit that has not yet been found. The HSPICE® version is a selective version of .INC but unlike .INC it doesn't include the whole file, just a specified portion of it.

In this topic:

SIMetrix Native Form

.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 (").
The SIMetrix form of this statement specifies a pathname to be searched for model and subcircuit libraries. Any number of .LIB statements may be specified and wildcards (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 statement.

SIMetrix will also search for definitions for unresolved parameters specified in expressions. These are defined using .PARAM.

Example

The following statement instructs the simulator to search all files with the .mod extension in c:\ Spice Model Library\ for any required subcircuits or device models.

.lib "c:\Spice Model Library\*.mod"

HSPICE Form

.LIB 'filename' entryname
filename File system path name specifying a single file.
entryname Name used to identify sections within filename
When HSPICE® the form of .LIB is encountered, SIMetrix will search the file specified by filename for a section enclosed by:
.LIB entryname

and

.ENDL

.LIB calls may be nested as long as they are not recurrent. That is a .LIB call within a .LIB .ENDL block may not call itself but it may call another block within the same file. (HSPICE® itself does not permit this).

This form of .LIB is commonly used in model files issued by semiconductor fabrication plants which tend to be designed for use with HSPICE®. The entry name parameter is used for process corner and skew selection. Typically the model file would have entries for - say - slow, nominal and fast models. These would reside under entry names of, perhaps, SS, NOM, and FF respectively. You can very rapidly switch between these model sets simply by changing the entry name on the .LIB line e.g.

would select the nominal models. Changing to:

.LIB 'c:\models\fab1\process_a\top.mod' NOM

would switch to the slow models.