next up previous contents index
Next: Model Library Files Up: Device Library File Previous: Device Library Aliases   Contents   Index

Device Library Devices

A device is simply an electrical cell definition. It is distinguished as a device by the presence and values of certain properties. Devices have no subcells or sub-devices, they must contain only geometry. They can not contain physical data.

The supplied device.lib file contains a collection or rather plain looking generic device models that correspond to the devices supported by SPICE. Additional devices are often created when a layout is imported from Cadence Virtuoso. These correspond to the schematic symbols of devices used in Virtuoso schematics. Devices can be created by the user through use of the Save As Device button in the File Menu. These can be used to supplement or replace devices provided in the default library.

Device definitions as native cell definitions, whether inline in the device.lib file, or in separate files, may or may not have an empty physical part. This is in contrast with normal cells, where a physical part is required. In releases prior to 4.1.12, inline cell definitions could not have an empty physical block, but in a cell file the empty physical block was required.

Devices can be referenced in three ways:

  1. By using the Reference keyword to reference a cell containing the device definition.

  2. By using the Directory keyword to reference a directory that contains device definitions. This is particularly useful as a way to include a user's special devices. One can ``install'' the device by simply copying it into a directory.

  3. By including the device definition in the library file as an inline cell definition. This is the format used in the supplied device.lib file. In early Xic releases, this was the only way to define devices.

The native syntax for device definitions, as used in the supplied device.lib file, is described below. This is the same CIF-like file format as used in native cell files. The syntax as described applies to native-format device cell files as well as devices inlined into the device.lib file. However, for stand-alone cell descriptions, other file formats can be used.

In these cells, there is no physical representation, however an empty physical representation can appear. The default resolution is 100 units per micron (as in CIF and native cell files), however the (RESOLUTION 1000); comment can appear, which indicates 1000 units per micron, as in ordinary cells. Each device entry has the following format:

(Symbol symname);
5 property;
5 ... ;
9 symname;
DS 0 1 1;
geometry ...
more layers/geometry ...

The first line is a CIF comment stating the device name, e.g., for a capacitor one might have

(Symbol cap);
This line signals the beginning of a device definition to the function that automatically updates the device library file after a device is edited (see 8.5), so must appear as shown for that feature to work correctly.

This is followed by property specification lines, which begin with the number `5', and a cell name definition, which begins with the number `9'. The property lines can occur in any order. Technically, the property lines are optional, however the name line is mandatory. All lines in the symbol specification parts of the file must end with a semicolon (;), except for the symbol termination line ``E''. While the device is being parsed, the `;' is actually taken to be the line terminator, so that logical lines can span several printed lines.

The name line begins with `9' in the first column, followed by the symbol name (space separated), and ending with a semicolon (without space). This line actually defines the name of the device, as known to Xic. The property lines define the device terminals and other parameters through the property mechanism. Each line begins with `5' in the first column, followed by the property number, followed by other data, and finally terminated with a semicolon. Refer to properties description (Appendix D) for information about properties and their syntax. If the device represents a subcircuit macro, the name property must be keyed with the character `x' or `X'.

After the property lines comes a CIF define symbol directive:

DS 0 1 1;
The next line is a directive to use the SCED layer, which is the active layer in the drawing:
The drawing in the cell should be on this layer to visually match the other elements, however there is no real requirement for this. There are additional layers in the default technology which can be used, typically for highlighting. The geometry used in a device has no electrical significance, i.e., no connectivity, and exists for visual purposes only.

The devices in the supplied device.lib file use 100 units per internal ``micron'' for historical reasons. Be advised that if a (RESOLUTION 1000); line appears at the top of the device definition, 1000 units will be assumed for the device. Devices that are edited by Xic or added through Xic editing will use 1000 units.

After the geometry comes the CIF directive to end symbol definition:

The last line of the device definition contains the single character
which indicates the end of the device symbol definition. Note that in this case there is no terminating semicolon.

As an example, here is a sample library entry for a resistor:

# resistor
(Symbol res);
5 10 -1 0 0 0 + 0 0 0;
5 10 -1 1 0 -1000 - 0 0 0;
5 11 R 0;
5 15 -100 -100 0 -1 "<v>/<value>";
9 res;
DS 0 1 1;
W 0 0 -1000 0 -750 -100 -700 100 -600 -100 -500 100 -400 -100 -300 0 -250 0 0;
W 0 -100 -75 -100 -125;
W 0 -125 -100 -75 -100;

The property lines (lines beginning with `5') represent two node definitions, a name, and a branch, in that order. The `W' line (wire) following the SCED layer declaration represents the path used to render the resistor schematic symbol. The other two `W' lines, following the ETC1 layer declaration, represents a `+' mark used to distinguish the positive end of the resistor, and the target upon which the user clicks to obtain the resistor current, in conjunction with the branch property.

The device library file can be viewed or edited from within Xic through the Open command. If ``device.lib'' (or the actual file name) is given in response to the cell-to-edit prompt, a text editing window displaying the file appears. Actually, the current device library file is first copied to the current directory (if it is not already there), and the copy is opened for editing. After saving changes and quitting the text editor, the internal device database is rebuilt from the device library file in the current directory.

Devices from the library can also be edited graphically, and devices added, from within Xic. This will be described in the following section.

The terminal device is a special non-physical object used for tying different parts of the circuit together without a wire, and for assigning node names. The library can contain multiple, functionally equivalent terminal devices under various names, each possibly with a different visual style. The name label of a terminal device defaults to the device name, but can be changed by editing the label text once placed. It is important that the name property of the device begin with the character `@'.

In the library, any device that has no name property and exactly one node property will be taken as a ground terminal device. A terminal device will also have exactly one node property, but must have a name property with a name string starting with the `@' character.

See section 7.5 and the subsections that follow for more information about the device menu and the various devices provided in the distributed device.lib file.

next up previous contents index
Next: Model Library Files Up: Device Library File Previous: Device Library Aliases   Contents   Index
Stephen R. Whiteley 2022-05-28