This chapter describes Electric's native file format, which ends in "jelib". These files contain an entire library of cells. The "delib" variation is used when each cell is stored in its own file (useful when using CVS version control on a project, see Section 6-13). The earlier file format, which ends in "elib", remains undocumented and is no longer recommended.

JELIB files are text-readable files. Each line of a JELIB file starts with an identifying character that distinguishes the line. Blank lines, and those that start with the comment identifying character (#) are ignored. There is no limit to the length of a line of text.

After the identifying character at the start of a line, there are a set of fields. All of the fields are separated by the separator character (|) except for the first field, which begins immediately after the identifying character. No blank spaces are allowed on a line (that is, any blank spaces are treated as valid characters). Control characters (such as the identifying characters) must be upper case. In order to insert a '|' or '\n' or '\r' into a field, it must be enclosed in the quotation mark characters ("). Backslash character can be used inside enclosed strings to denote special characters:

CharactersMeaning
\nline feed character (\n)
\rcarriage return character (\r)
\"quotation mark character (")
\\backslash character (\)

Each of the different types of lines in the file has a fixed set of fields that must appear. Some line types also allow additional fields at the end to add variables (attribute/value pairs, see Section 10-4-1).

The JELIB file has 3 parts: the header, cells, and trailer.

The header has these elements:

HHeader information; variable fields are allowed
VView information
LExternal library information
RExternal cell in the above external library
FExternal export in the above external cell
TTechnology information; variable fields are allowed
OTool information; variable fields are allowed

The cells have these elements:

CCell header; variable fields are allowed
NPrimitive node information in the current cell; variable fields are allowed
ICell instance information in the current cell; variable fields are allowed
AArc information in the current cell; variable fields are allowed
EExport information in the current cell; variable fields are allowed
XCell termination

The trailer has this optional element:

GGroup information

Everything in the file is completely ordered. There is an ordering to the external libraries, cells in those libraries, technologies, tools, cells, nodes/arcs/exports in a cell, etc. Even the extra variables on a line are ordered. The ordering is usually a name sort. By ordering everything in the file, the exact same file is generated every time, and text comparison operations will accurately find differences between two files. Note, however, that the JELIB reader does not require any sorting, and can handle the data in any order.