1
<HTML><HEAD><TITLE>Using Electric 3-9: Libraries</TITLE></HEAD>
2
<BODY BGCOLOR="#FFFFFF">
3
<!-- PAGE BREAK --><A NAME="chap03-09"></A>
5
<BR><CENTER><FONT SIZE=6><B>Chapter 3: HIERARCHY</B></FONT></CENTER><BR>
6
<CENTER><TABLE WIDTH="90%" BORDER=0><TR>
7
<TD><CENTER><A HREF="chap03-08.html#chap03-08"><IMG SRC="../images/iconplug.png" ALT="plug" BORDER=0></A></CENTER></TD>
8
<TD><CENTER><H2>3-9: Libraries</H2></CENTER></TD>
9
<TD><CENTER><A HREF="chap03-10.html#chap03-10"><IMG SRC="../images/iconplug.png" ALT="plug" BORDER=0></A></CENTER></TD></TR></TABLE></CENTER>
13
A <I>library</I> is a collection of cells and facets that forms a consistent hierarchy.
14
To enforce this consistency,
15
Electric stores an entire library in one disk file that is read or written at one time.
16
It is possible, however, to have multiple libraries in Electric.
17
Only one library is the current one, and this sometimes affects commands that work at the library level.
18
When there are multiple libraries, you can switch between them with the <B>Change Current Library...</B>
19
command of the <B>File</B> menu.
20
To see which libraries are read in, use the <B>List Libraries</B> command of the <B>Info</B> menu.
22
To create a new, empty library, use the <B>New Library...</B> command of the <B>File</B> menu.
23
To change the name of the current library, use the <B>Rename Library...</B> command.
24
To delete a library, use the <B>Close Library</B> command.
25
This removes only the memory representation, not the disk file.
26
Note that library changes are too vast to be tracked by the database-change mechanism and so are not undoable.
28
It is possible to link two libraries by placing an instance of a facet from one library into another
29
(this is done with the <B>New Facet Instance...</B> command of the <B>Edit</B> menu).
30
When this happens, the library with the instance
31
(the main library) is linked to the library with the actual facet (this is the <I>reference library</I>).
32
Because the reference library is needed to complete the main library,
33
it will be read whenever the main library is read.
35
If referenced libraries are edited independently,
36
it is possible that a reference to a facet in another library will not match the actual facet in that library.
37
When this happens, Electric creates a "placeholder" facet that matches the original specification.
38
Thus, the link to the referenced library is broken because the facet there does not fit where the instance should be.
39
To see a list of all placeholder facets that were created because of such problems,
40
use the <B>List Placeholder Facets</B> subcommand of the <B>Facet Information</B> command of the
43
<H3>Reading Libraries</H3>
45
The <B>Open Library...</B> command of the <B>File</B> menu brings a new library into Electric from disk.
46
These disk files are in a private binary format (that is, not readable outside of Electric).
48
Besides Electric libraries,
49
it is possible to read circuit descriptions that are in other formats with the <B>Import</B> command of the <B>File</B> menu.
50
Most of these commands place the data into a new library that has the same name as the disk file.
51
When reading these files,
52
it is important that the current technology be set to the one in the file so that proper layer conversion can be done
53
(use the <B>Change Current Technology...</B> command of the <B>Technology</B> menu).
54
These formats can be read:
56
<LI><B>Caltech Intermediate Format (CIF)</B> is used to describe integrated circuit layout.
57
It contains no connectivity, so after the library is read,
58
it does not know about transistors and contacts: just layers.
59
Use the <B>CIF Options...</B> subcommand of the <B>IO Options</B> command to affect how CIF is read.
60
<LI><B>Stream (GDS II)</B> is also used to describe integrated circuit layout.
61
It contains no connectivity, so after the library is read,
62
it does not know about transistors and contacts: just layers.
63
Use the <B>GDS Options...</B> subcommand of the <B>IO Options</B> command to affect how GDS is read.
64
On Windows, it is possible to select multiple files for input.
65
If you do this, all of the GDS will be read into the current library.
66
<LI><B>Electronic Design Interchange Format (EDIF)</B> is used to describe both schematics and layout.
67
Electric reads EDIF version 2 0 0.
68
<LI><B>VHDL</B> is a hardware description language that describes the structure of a circuit.
69
When VHDL is read, it is not converted to layout,
70
but instead is placed into a text facet with the {vhdl} view.
71
<LI><B>Library Exchange Format (LEF)</B> is an interchange format that describes the cells in a library.
72
The facets that are read in contain ports, but very little contents.
73
<LI><B>Design Exchange Format (DEF)</B> is an interchange format that describes the contents of a library.
74
DEF input often makes use of associated LEF files which must already have been read.
75
Use the <B>DEF Options...</B> subcommand of the <B>IO Options</B> command to affect how DEF is read.
76
<LI><B>AutoCAD DXF</B> is a solid-modeling interchange format,
77
and so it may contain 3D objects that cannot be read into Electric.
78
Nevertheless, Electric creates a library of artwork primitives as well as it can
79
(you must switch to the Artwork technology before importing DXF).
80
Use the <B>DXF Options...</B> subcommand of the <B>IO Options</B> command to affect how DXF is read.
81
<LI><B>Standard Delay Format (SDF)</B> is used to read test vector parameters and place them on facets in the current library.
82
Before this data can be used by the simulator, one of the three sets
83
(<B>Typical</B>, <B>Minimum</B>, or <B>Maximum</B>) must be selected with the <B>Annotate Delay Data (ALS)</B>
84
subcommand of the <B>Simulate</B> command of the <B>Tools</B> menu.
85
<LI><B>Schematic User Environment (SUE)</B> is a schematic editor that captures a single cell in each file.
86
The circuitry in SUE files is added to the current library instead of being placed in its own library
87
(because many SUE files may have to be read to build up a single Electric library).
88
<LI><B>Readable Dump</B> is an Electric-specific format that captures the entire database,
89
but in an editable text format.
90
Because it is text, it is slower to read than Electric's binary files,
91
and takes up more space on disk.
92
However, it can be transferred between machines more reliably and can be edited if necessary.
94
See <A HREF="chap07-03.html#chap07-03">Section 7-3</A>
95
for more information on external formats.
97
<H3>Writing Libraries</H3>
99
Writing libraries to disk is done with the <B>Save Library</B> command of the <B>File</B> menu.
100
The <B>Save All Libraries</B> command of the <B>File</B> menu writes all libraries that have changed.
101
If a library was read from disk, it is written back to the same file.
102
If, however, you wish to write the library to a new file
103
(thus preserving the original) then use the <B>Save Library As...</B> command.
105
<TABLE><TR><TD VALIGN=TOP>
106
The <B>Library Options...</B> subcommand of the <B>IO Options</B> command of the <B>File</B>
107
menu controls the writing of libraries to disk.
108
By default, saved libraries overwrite the previous libraries and no backup is created.
109
If you choose "Backup of last library file",
110
then the former library is renamed so that it has a "~" at the end.
111
If you choose "Backup history of library files",
112
then the former library is renamed so that it has its creation date as part of its name.
113
You can also use this dialog to request that the database be checked when saves are done.
114
</TD><TD><CENTER><IMG SRC="../images/chap03-19.png" ALT="Figure 3.19"></CENTER></TD></TR></TABLE>
116
Electric can also write external format files with the <B>Export</B> command of the <B>File</B> menu.
117
These formats can be written:
119
<LI><B>Caltech Intermediate Format (CIF)</B> is used to describe integrated circuit layout.
120
The output file contains only the current facet and any circuitry below that in the hierarchy.
121
Use the <B>CIF Options...</B> subcommand of the <B>IO Options</B> command to affect how CIF is written.
122
<LI><B>Stream (GDS II)</B> is also used to describe integrated circuit layout.
123
The output file contains only the current facet and any circuitry below that in the hierarchy.
124
Use the <B>GDS Options...</B> subcommand of the <B>IO Options</B> command to affect how GDS is written.
125
<LI><B>Electronic Design Interchange Format (EDIF)</B> can write either the Netlist or the Schematic view of the circuit.
126
Use the <B>EDIF Options...</B> subcommand of the <B>IO Options</B> command to affect how EDIF is written.
127
Electric writes EDIF version 2 0 0.
128
<LI><B>Library Exchange Format (LEF)</B> is an interchange format that describes the exports on facets in a library.
129
<LI><B>Circuit Design Language (CDL)</B> is a Cadence interchange format for netlists.
130
<LI><B>Eagle</B> is an interface to the Eagle schematics design system (netlist format).
131
Before writing Eagle files, you must give every node the "ref_des" attribute,
132
and every port on these nodes the "pin" attribute.
133
If you also place the "pkg_type" attribute on the node, it overrides the cell name.
134
Use the <B>Define...</B> subcommand of the <B>Attributes</B> command of the <B>Info</B> menu to create these attributes
135
(see <A HREF="chap06-08.html#chap06-08">Section 6-8</A> for more information).
136
Also, every network must be named.
137
<LI><B>ECAD</B> is an interface to the ECAD schematics design system (netlist format).
138
<LI><B>Pads</B> is an interface to the Pads schematics design system (netlist format).
139
<LI><B>AutoCAD DXF</B> is a solid-modeling interchange format.
140
Use the <B>DXF Options...</B> subcommand of the <B>IO Options</B> command to affect how DXF is written.
141
<LI><B>L</B> is the GDT language, still appearing in some commercial systems.
142
The output file contains only the current facet and any circuitry below that in the hierarchy.
143
<LI><B>PostScript</B> is the Adobe printing language.
144
The output file contains only a visual representation of the current facet
145
(or part of that facet).
146
PostScript options can be controlled with the <B>Print Options...</B> command of the <B>File</B> menu.
147
<LI><B>HPGL</B> is the Hewlett-Packard printing language.
148
The output file contains only a visual representation of the current facet
149
(or part of that facet).
150
HPGL options can be controlled with the <B>Print Options...</B> command of the <B>File</B> menu.
151
<LI><B>Readable Dump</B> is an Electric-specific format that captures the entire database,
152
but in an editable text format.
153
Because it is text, it takes up more space on disk.
154
However, it can be transferred between machines more reliably and can be edited if necessary.
156
See <A HREF="chap07-03.html#chap07-03">Section 7-3</A>
157
for more information on external formats.
159
<H3>Standard-Cell Libraries</H3>
161
Electric does not come with any useful libraries for doing design.
162
However, the system is able to make use of <A HREF="http://www.artisan.com">Artisan</A> libraries.
163
These libraries are free, provided that you sign an Artisan license.
164
Once you are licensed, you will have standard cell libaries, pad libraries, memory libraries,
167
Artisan libraries are not distributed in Electric format.
168
Instead, they come in a variety of formats that can be read into Electric.
169
The GDS files contain the necessary geometry, and the LEF files contain the connectivity.
170
By combining them, Electric creates a standard cell library that can be placed-and-routed
171
(with the silicon compiler) and can be fabricated.
172
Note that the data is not node-extracted,
173
so not all of Electric's capabilities can be used with this data.
175
To create an Artisan library, follow these steps:
177
<LI>Select the Artisan data that you want and extract the GDS and LEF files for it.
178
The GDS files will have the extension ".gds2", which is not what Electric expects
179
(Electric expects them to end with ".gds"), so you may want to rename them.
180
<LI>Read the LEF file into Electric with the <B>LEF (Library Exchange Format)</B>
181
subcommand of the <B>Import</B> command of the <B>File</B> menu.
182
Keep in mind that the LEF data may come in multiple versions for different numbers of metal layers.
183
<LI>Read the GDS data into Electric with the <B>GDS II (Stream)</B> subcommand of the <B>Import</B>
184
command of the <B>File</B> menu.
185
Note that the proper GDS layers must be established first
186
(with the <B>GDS II Options...</B> subcommand of the <B>IO Options</B> command of the <B>File</B> menu).
187
As an aid in this process,
188
you may find it helpful to read either the file "tsmc25.txt" or "umc18.txt" in the Electric library directory
189
(these are Readable Dump files that can be read with the <B>Readable Dump</B> subcommand of the <B>Import</B>
190
command of the <B>File</B> menu).
191
Note that there will now be two libraries in memory: one with the GDS data and one with the LEF data.
192
<LI>Merge the port information from the LEF library into the GDS library.
193
It is important that the GDS library be the "current library"
194
(use the <B>Change Current Library...</B> command of the <B>File</B> menu if it is not).
195
To merge the LEF port information, use the <B>Add Export from Library...</B> command of the <B>Export</B> menu.
196
You will be prompted for a library, and should select the one with the LEF data.
197
<LI>At this point, the GDS library now has standard cells in it.
198
Before saving it to disk, you should probably use the <B>Facet Options...</B> command of the <B>Facets</B>
199
menu and set all of the facets to be "Part of a cell-library".
202
<CENTER><TABLE BORDER=0><TR>
203
<TD><A HREF="chap03-08.html#chap03-08"><IMG SRC="../images/iconbackarrow.png" ALT="Prev" BORDER=0></A></TD>
204
<TD><A HREF="chap03-08.html#chap03-08">Previous</A></TD>
205
<TD> </TD>
206
<TD><A HREF="../index.html"><IMG SRC="../images/iconcontarrow.png" ALT="Contents" BORDER=0></A></TD>
207
<TD><A HREF="../index.html">Table of Contents</A></TD>
208
<TD> </TD>
209
<TD><A HREF="chap03-10.html#chap03-10">Next</A></TD>
210
<TD><A HREF="chap03-10.html#chap03-10"><IMG SRC="../images/iconforearrow.png" ALT="Next" BORDER=0></A></TD>
211
</TR></TABLE></CENTER>