This chapter describes Electric's native file format, which ends in "jelib". 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:
| Characters | Meaning |
|---|---|
| \n | line feed character (\n) |
| \r | carriage 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:
| H | Header information; variable fields are allowed |
| V | View information |
| L | External library information |
| R | External cell in the above external library |
| F | External export in the above external cell |
| T | Technology information; variable fields are allowed |
| D | Primitive Node information in the above technology |
| P | Primitive Port information in the above primitive node |
| W | Primitive Arc information in the above technology |
| O | Tool information |
The cells have these elements:
| C | Cell header; variable fields are allowed |
| N | Primitive node information in the current cell; variable fields are allowed |
| I | Cell instance information in the current cell; variable fields are allowed |
| A | Arc information in the current cell; variable fields are allowed |
| E | Export information in the current cell; variable fields are allowed |
| X | Cell termination |
The trailer has this element:
| G | Group 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 source-code 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.