next up previous contents index
Next: Initialization Up: Title, Comments, and Inclusions Previous: .include Line   Contents   Index


.lib Line

General Form:
.lib path_to_file name
Example:
.lib /usr/local/parts/mylib mos25

This will look in path_to_file for lines enclosed as follows.

.lib name
... lines of SPICE text
.endl
The lines inside the block will be read into the input deck being parsed, similar to the .include line.

The library file can contain any number of .lib blocks. The .lib block can itself contain .lib references. The text can be any valid WRspice input. The name is an arbitrary text token, which should be unique among the .lib blocks in a library file.

Example:
title line
.lib /usr/stevew/spice/stuff/mylibrary mosblock
... more lines

In /usr/stevew/spice/stuff/mylibrary:

.lib mosblock
m0 4 9 12 PSUB p1pvt l=0.25u w=2.4u
.endl

is equivalent to:

title line
m0 4 9 12 PSUB p1pvt l=0.25u w=2.4u
... more lines

In WRspice, the keyword .splib is accepted as a synonym for .lib. This is for compatibility with Xic, which will replace .lib lines with the block of text from the library, but will pass .splib lines to SPICE, after converting ``.splib'' to ``.lib''.


next up previous contents index
Next: Initialization Up: Title, Comments, and Inclusions Previous: .include Line   Contents   Index
Stephen R. Whiteley 2006-10-23