In present Xic releases, devices are not required to be supplied in the device library, however only devices referenced in the library will appear in the device selection menus. When loading a design produced in Virtuoso, for example, the schematic symbols are imported as cells which function as devices, but are not automatically included in any device library. As long as Xic can find these device cells when the layout file is loaded, all is well. This is automatic if the device cells are kept in the layout files, which is true by default. However, the device cells can be added to the device library in various ways, as described below. This has the following advantages:
Devices can be either primitive devices as used by SPICE, or subcircuit macros. If the device represents a subcircuit macro, the name of the subcircuit is given as a model property, and that subcircuit must exist in one of the model library files. For example, a device named ``opamp'' could be added to the device library file. Then the user would set the model property to something like ``ua741'' which would have a subcircuit definition somewhere in the model library files (perhaps in a directory containing SPICE models obtained from a semiconductor manufacturer).
There are four classes of device that may appear in the device library file. The first class consists of basic elements such as resistors, capacitors, and semiconductor devices which have physical implementations in a layout and are known elements in SPICE. The second class consists of voltage and current sources, which are known elements in SPICE but do not have physical equivalents in a layout. The third class applies to macros, which expand to a subcircuit in SPICE. These may or may not have an actual physical embodiment. The fourth class are terminals, which are used in the electrical schematic to provide connections. These are not used in SPICE, but are used to establish connectivity when producing SPICE input. They have no direct physical implementation, but imply physical connections.
The first line of the file must be in the form
(Library filename);This is the signature used in all library files.
Comment lines, which are ignored when the file is parsed, begin with the `#' character, and can appear anywhere outside of the device definitions except on the first line. Lines containing only white space are ignored.