Chapter 3: HIERARCHY

plug

3-9: Libraries

plug


A library is a collection of cells and cells that forms a consistent hierarchy. To enforce this consistency, Electric stores an entire library in one disk file that is read or written at one time. It is possible, however, to have multiple libraries in Electric. Only one library is the current one, and this sometimes affects commands that work at the library level. When there are multiple libraries, you can switch between them with the Change Current Library... command of the File menu. To see which libraries are read in, use the List Libraries command.

To create a new, empty library, use the New Library... command of the File menu. To change the name of the current library, use the Rename Library... command. To delete a library, use the Close Library command. This removes only the memory representation, not the disk file. Note that library changes are too vast to be tracked by the database-change mechanism and so are not undoable.

It is possible to link two libraries by placing an instance of a cell from one library into another (this is done with the New Cell Instance... command of the Edit menu). When this happens, the library with the instance (the main library) is linked to the library with the actual cell (this is the reference library). Because the reference library is needed to complete the main library, it will be read whenever the main library is read.

If referenced libraries are edited independently, it is possible that a reference to a cell in another library will not match the actual cell in that library. When this happens, Electric creates a "placeholder" cell that matches the original specification. Thus, the link to the referenced library is broken because the cell there does not fit where the instance should be. To see a list of all placeholder cells that were created because of such problems, use the General Cell Lists... command of the Cells menu and select "Only placeholder cells".

Reading Libraries

The Open Library... command of the File menu brings a new library into Electric from disk. These disk files are in a private binary format (that is, not readable outside of Electric).

Besides Electric libraries, it is possible to read circuit descriptions that are in other formats with the Import command of the File menu. Most of these commands place the data into a new library that has the same name as the disk file. When reading these files, it is important that the current technology be set to the one in the file so that proper layer conversion can be done (use the Change Current Technology... command of the Technology menu). These formats can be read:

See Section 7-3 for more information on external formats.

Writing Libraries

Writing libraries to disk is done with the Save Library command of the File menu. The Save All Libraries command of the File menu writes all libraries that have changed. If a library was read from disk, it is written back to the same file. If, however, you wish to write the library to a new file (thus preserving the original) then use the Save Library As... command.

The Library Options... subcommand of the IO Options command of the File menu controls the writing of libraries to disk. By default, saved libraries overwrite the previous libraries and no backup is created. If you choose "Backup of last library file", then the former library is renamed so that it has a "~" at the end. If you choose "Backup history of library files", then the former library is renamed so that it has its creation date as part of its name. You can also use this dialog to request that the database be checked when saves are done.
Figure 3.19

Electric can also write external format files with the Export command of the File menu. These formats can be written:

The exported files from Electric are often considered to be proprietary information, and must be marked appropriately.
Figure 3.13
By using the Copyright Options... subcommand of the IO Options command of the File menu, a disk file with copyright information can be inserted into exported files. Since each export file has a different format for comments, the copyright file should not contain any such characters. Instead, the system will insert the proper comment characters for the particular export format.

The copyright file will be inserted into decks exported for CIF, LEF, and CDL, as well as in simulation netlists for Verilog, SPICE, FastHenry, IRSIM, and ESIM. See Section 7-3 for more information on external formats.

Standard-Cell Libraries

Electric does not come with any useful libraries for doing design. However, the system is able to make use of Artisan libraries. These libraries are free, provided that you sign an Artisan license. Once you are licensed, you will have standard cell libaries, pad libraries, memory libraries, and more.

Artisan libraries are not distributed in Electric format. Instead, they come in a variety of formats that can be read into Electric. The GDS files contain the necessary geometry, and the LEF files contain the connectivity. By combining them, Electric creates a standard cell library that can be placed-and-routed (with the silicon compiler) and can be fabricated. Note that the data is not node-extracted, so not all of Electric's capabilities can be used with this data.

To create an Artisan library, follow these steps: