next up previous contents index
Next: Editing Devices Up: Device Library File Previous: Device Library Aliases   Contents   Index


Device Library Devices

The rest of the file consists of multiple concatenated device specifications. There is no physical representation, and the resolution as shown (and as in the supplied device.lib file) is 100 units per ``micron''. However, the (RESOLUTION 1000); comment can appear, which indicates 1000 units per ``micron'', as in ordinary cells. Each device has the following format:

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

The format is extended CIF, as used in the electrical description of native cell files. 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 A.7), 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 B) 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:
L SCED;
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:

DF;
The last line of the device definition contains the single character
E
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;
L SCED;
W 0 0 -1000 0 -750 -100 -700 100 -600 -100 -500 100 -400 -100 -300 0 -250 0 0;
L ETC1;
W 0 -100 -75 -100 -125;
W 0 -125 -100 -75 -100;
DF;
E

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 `@'. The label associated with a terminal is placed on the NODE layer, though this is not critical.

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. A bus terminal must not have a node property, but requires a name property with a string starting with `#', and a param property with an integer value.

See section 4.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: Editing Devices Up: Device Library File Previous: Device Library Aliases   Contents   Index
Stephen R. Whiteley 2012-04-01