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:
.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 ("). |
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.
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"
.LIB 'filename' entryname
filename | File system path name specifying a single file. |
entryname | Name used to identify sections within filename |
.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.
◄ .LOAD | .MAP ▶ |