ch09.4.htm
来自「介绍asci设计的一本书」· HTM 代码 · 共 1,773 行 · 第 1/4 页
HTM
1,773 行
<P CLASS="Body">
<A NAME="pgfId=25077">
</A>
The net form for myInput (and the one that follows it for myOutput) ties the net names in our schematic to the ports <SPAN CLASS="BodyComputer">
I</SPAN>
and <SPAN CLASS="BodyComputer">
O</SPAN>
of the library cell <SPAN CLASS="BodyComputer">
INV</SPAN>
.</P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=25137">
</A>
(net VDD (joined )) (net VSS (joined ))))))</P>
<P CLASS="Body">
<A NAME="pgfId=25135">
</A>
These forms for the global <SPAN CLASS="BodyComputer">
VDD</SPAN>
and <SPAN CLASS="BodyComputer">
VSS</SPAN>
nets are often handled differently by different tools (one company might call the negative supply <SPAN CLASS="BodyComputer">
GND</SPAN>
instead of <SPAN CLASS="BodyComputer">
VSS</SPAN>
, for example). This section is where you most often have to edit the EDIF.</P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=25176">
</A>
(design HALFGATE_P (cellRef HALFGATE_P (libraryRef working))))</P>
<P CLASS="Body">
<A NAME="pgfId=25174">
</A>
The design form names and places our design in library working, and completes the EDIF description.</P>
</DIV>
<DIV>
<H3 CLASS="Heading2">
<A NAME="pgfId=22297">
</A>
9.4.3 <A NAME="38118">
</A>
An EDIF Schematic Icon</H3>
<P CLASS="BodyAfterHead">
<A NAME="pgfId=22298">
</A>
EDIF is capable of handling many different representations. The next EDIF example is another view of an inverter that describes how to draw the icon (the picture that appears on the printed schematic or on the screen) shown in <A HREF="#12012" CLASS="XRef">
Figure 9.9</A>
. We shall examine the EDIF created by the <A NAME="marker=30928">
</A>
CAD/CAM Group’s <A NAME="marker=30929">
</A>
Engineering Capture System (<A NAME="marker=30930">
</A>
ECS) schematic editor. </P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableFigure">
<A NAME="pgfId=31392">
</A>
<IMG SRC="CH09-10.gif" ALIGN="BASELINE">
</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableFigureTitle">
<A NAME="pgfId=31395">
</A>
FIGURE 9.9 <A NAME="12012">
</A>
An EDIF view of an inverter icon. The coordinates shown are in EDIF units. The crosses that show the text location origins and the dotted bounding box do not print as part of the icon.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId=31385">
</A>
This time we shall give more detailed explanations after each piece of EDIF code. We shall also maintain balanced parentheses to make the structure easier to follow. To shorten the often lengthy EDIF code, we shall use an ellipsis<SPAN CLASS="BodyComputer">
</SPAN>
(<SPAN CLASS="BodyComputer">
...</SPAN>
) to indicate any code that has been left out.</P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=25312">
</A>
(edif ECS</P>
<P CLASS="Computer">
<A NAME="pgfId=25313">
</A>
(edifVersion 2 0 0)</P>
<P CLASS="Computer">
<A NAME="pgfId=25314">
</A>
(edifLevel 0)</P>
<P CLASS="Computer">
<A NAME="pgfId=25315">
</A>
(keywordMap (keywordLevel 0))</P>
<P CLASS="Computer">
<A NAME="pgfId=25316">
</A>
(status</P>
<P CLASS="Computer">
<A NAME="pgfId=25317">
</A>
(written</P>
<P CLASS="Computer">
<A NAME="pgfId=25318">
</A>
(timeStamp 1987 8 20 0 50 23)</P>
<P CLASS="Computer">
<A NAME="pgfId=25319">
</A>
(program "CAD/CAM Group, Inc. ECS" (Version "1"))))</P>
<P CLASS="Computer">
<A NAME="pgfId=25320">
</A>
(library USER ...</P>
<P CLASS="Computer">
<A NAME="pgfId=25321">
</A>
)</P>
<P CLASS="Computer">
<A NAME="pgfId=25322">
</A>
...</P>
<P CLASS="ComputerLast">
<A NAME="pgfId=25323">
</A>
)</P>
<P CLASS="Body">
<A NAME="pgfId=11516">
</A>
This preamble is virtually identical to the previous netlist example (and demonstrates that EDIF is useful to store design information as software tools come and go over many years). The first line of the file defines the name of the file. This is followed by lines that identify the version of EDIF being used and the highest EDIF level used in the file (each library may use its own level up to this maximum). EDIF level 0 supports only literal constants and basic constructs. Higher EDIF levels support parameters, expressions, and flow control constructs. EDIF keywords may be mapped to aliases, and keyword macros may be defined within the <SPAN CLASS="BodyComputer">
keywordMap</SPAN>
form. These features are not often used in ASIC design because of a lack of standardization. The <SPAN CLASS="BodyComputer">
keywordLevel 0</SPAN>
indicates these capabilities are not used here. The status construct is used for administration: when the file was created, the software used to create the file, and so on. Following this preamble is the main section of the file, which contains design information.</P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=24689">
</A>
(library USER (edifLevel 0)</P>
<P CLASS="Computer">
<A NAME="pgfId=24690">
</A>
(technology</P>
<P CLASS="Computer">
<A NAME="pgfId=24691">
</A>
(numberDefinition</P>
<P CLASS="Computer">
<A NAME="pgfId=24692">
</A>
(scale 4 (e 254 -5) (unit distance)))</P>
<P CLASS="Computer">
<A NAME="pgfId=24693">
</A>
(figureGroup NORMAL</P>
<P CLASS="Computer">
<A NAME="pgfId=24694">
</A>
(pathWidth 0) (borderWidth 0)</P>
<P CLASS="Computer">
<A NAME="pgfId=24695">
</A>
(textHeight 5))</P>
<P CLASS="Computer">
<A NAME="pgfId=24696">
</A>
(figureGroup WIDE</P>
<P CLASS="Computer">
<A NAME="pgfId=24697">
</A>
(pathWidth 1) (borderWidth 1)</P>
<P CLASS="Computer">
<A NAME="pgfId=24698">
</A>
(textHeight 5)))</P>
<P CLASS="Computer">
<A NAME="pgfId=24699">
</A>
(cell 7404 ...</P>
<P CLASS="Computer">
<A NAME="pgfId=24700">
</A>
)</P>
<P CLASS="ComputerLast">
<A NAME="pgfId=24701">
</A>
)</P>
<P CLASS="Body">
<A NAME="pgfId=24685">
</A>
The <SPAN CLASS="BodyComputer">
technology</SPAN>
<A NAME="marker=11517">
</A>
form has a <SPAN CLASS="BodyComputer">
numberDefinition</SPAN>
that defines the scaling information (we did not use this form for a netlist, but the form must be present). The first <SPAN CLASS="BodyComputer">
numberValue</SPAN>
after scale represents EDIF numbers and the second <SPAN CLASS="BodyComputer">
numberValue</SPAN>
represents the units specified by the <SPAN CLASS="BodyComputer">
unit</SPAN>
form. The EDIF unit for distance is the meter. The <SPAN CLASS="BodyComputer">
numberValue</SPAN>
can be an integer or an exponential number. The <SPAN CLASS="BodyComputer">
e</SPAN>
form has a mantissa and an exponent. In this example, within the <SPAN CLASS="BodyComputer">
USER</SPAN>
library, a distance of 4 EDIF units equals 254 ¥ 10<SUP CLASS="Superscript">
–5</SUP>
meters (or 4 EDIF units equals 0.1 inch). </P>
<P CLASS="Body">
<A NAME="pgfId=3643">
</A>
After the <SPAN CLASS="BodyComputer">
numberDefinition</SPAN>
in the <SPAN CLASS="BodyComputer">
technology</SPAN>
form there are one or more <SPAN CLASS="BodyComputer">
figureGroup</SPAN>
definitions. A <SPAN CLASS="BodyComputer">
figureGroup</SPAN>
defines drawing information such as <SPAN CLASS="BodyComputer">
pathWidth</SPAN>
, <SPAN CLASS="BodyComputer">
borderWidth</SPAN>
, <SPAN CLASS="BodyComputer">
color</SPAN>
, <SPAN CLASS="BodyComputer">
fillPattern</SPAN>
, <SPAN CLASS="BodyComputer">
borderPattern</SPAN>
, and <SPAN CLASS="BodyComputer">
textHeight</SPAN>
. The <SPAN CLASS="BodyComputer">
figureGroup</SPAN>
form must have a name, which will be used later in the library to refer back to these definitions. In this example the <SPAN CLASS="BodyComputer">
USER</SPAN>
library has one <SPAN CLASS="BodyComputer">
figureGroup (NORMAL)</SPAN>
for lines and paths of zero width (the actual width will be implementation dependent) and another <SPAN CLASS="BodyComputer">
figureGroup (WIDE)</SPAN>
that will be used for buses with a wider width (for bold lines). The <SPAN CLASS="BodyComputer">
borderWidth</SPAN>
is used for drawing filled areas such as rectangles, circles, and polygons. The <SPAN CLASS="BodyComputer">
pathWidth</SPAN>
is used for open figures such as lines (paths) and open arcs. </P>
<P CLASS="Body">
<A NAME="pgfId=30973">
</A>
Following the <SPAN CLASS="BodyComputer">
technology</SPAN>
section the <SPAN CLASS="BodyComputer">
cell</SPAN>
forms each represent a symbol. The <SPAN CLASS="BodyComputer">
cell</SPAN>
form has a <SPAN CLASS="BodyComputer">
name</SPAN>
that will appear in the names of any files produced. The <SPAN CLASS="BodyComputer">
cellType</SPAN>
form <SPAN CLASS="BodyComputer">
GENERIC</SPAN>
type is required by this schematic editor. The <SPAN CLASS="BodyComputer">
property</SPAN>
form is used to list properties of the cell. </P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=3657">
</A>
(cell 7404 (cellType GENERIC)</P>
<P CLASS="Computer">
<A NAME="pgfId=3659">
</A>
(property SymbolType (string "GATE"))</P>
<P CLASS="Computer">
<A NAME="pgfId=3661">
</A>
(view PCB_Symbol (viewType SCHEMATIC)</P>
<P CLASS="Computer">
<A NAME="pgfId=3663">
</A>
(interface ...</P>
<P CLASS="Computer">
<A NAME="pgfId=3665">
</A>
)</P>
<P CLASS="Computer">
<A NAME="pgfId=3667">
</A>
)</P>
<P CLASS="ComputerLast">
<A NAME="pgfId=3669">
</A>
)</P>
<P CLASS="Body">
<A NAME="pgfId=3673">
</A>
The <SPAN CLASS="BodyComputer">
SymbolType</SPAN>
property is used to distinguish between purely graphical symbols that do not occur in the parts list (a ground connection, for example), gate or component symbols, and block or cell symbols (for hierarchical schematics). The <SPAN CLASS="BodyComputer">
SymbolType</SPAN>
property is a <SPAN CLASS="BodyComputer">
string</SPAN>
that may be <SPAN CLASS="BodyComputer">
COMPONENT</SPAN>
, <SPAN CLASS="BodyComputer">
GATE</SPAN>
, <SPAN CLASS="BodyComputer">
CELL</SPAN>
, <SPAN CLASS="BodyComputer">
BLOCK</SPAN>
, or <SPAN CLASS="BodyComputer">
GRAPHIC</SPAN>
. Each cell may contain <SPAN CLASS="BodyComputer">
view</SPAN>
forms and each <SPAN CLASS="BodyComputer">
view</SPAN>
must have a name. Following the name of the <SPAN CLASS="BodyComputer">
view </SPAN>
must be a <SPAN CLASS="BodyComputer">
viewType</SPAN>
that is either <SPAN CLASS="BodyComputer">
GRAPHIC</SPAN>
or <SPAN CLASS="BodyComputer">
SCHEMATIC</SPAN>
. Following the <SPAN CLASS="BodyComputer">
viewType</SPAN>
is the <SPAN CLASS="BodyComputer">
interface</SPAN>
form, which contains the symbol and terminal information. The <SPAN CLASS="BodyComputer">
interface</SPAN>
form contains the actual symbol data.</P>
<P CLASS="ComputerFirst">
<A NAME="pgfId=3687">
</A>
(interface</P>
<P CLASS="Computer">
<A NAME="pgfId=3689">
</A>
(port Pin_1</P>
<P CLASS="Computer">
<A NAME="pgfId=3691">
</A>
(designator "2")</P>
<P CLASS="Computer">
<A NAME="pgfId=3693">
</A>
(direction OUTPUT)</P>
<P CLASS="Computer">
<A NAME="pgfId=3695">
</A>
(dcMaxFanout 50))</P>
<P CLASS="Computer">
<A NAME="pgfId=3697">
</A>
(port Pin_2</P>
<P CLASS="Computer">
<A NAME="pgfId=3699">
</A>
(designator "1")</P>
<P CLASS="Computer">
<A NAME="pgfId=3701">
</A>
(direction INPUT)</P>
<P CLASS="Computer">
<A NAME="pgfId=3703">
</A>
(dcFanoutLoad 8)</P>
<P CLASS="Computer">
<A NAME="pgfId=3705">
</A>
(property Cap</P>
<P CLASS="Computer">
<A NAME="pgfId=3707">
</A>
(string "22")))</P>
<P CLASS="Computer">
<A NAME="pgfId=3709">
</A>
(property Value</P>
<P CLASS="Computer">
<A NAME="pgfId=3711">
</A>
(string "45"))</P>
<P CLASS="Computer">
<A NAME="pgfId=3713">
</A>
(symbol ...</P>
<P CLASS="ComputerLast">
<A NAME="pgfId=3715">
</A>
)</P>
<P CLASS="Body">
<A NAME="pgfId=3719">
</A>
If the symbol has terminals, they are listed before the <SPAN CLASS="BodyComputer">
symbol</SPAN>
form. The <SPAN CLASS="BodyComputer">
port</SPAN>
form defines each terminal. The required <SPAN CLASS="BodyComputer">
port</SPAN>
name is used later in the <SPAN CLASS="BodyComputer">
symbol</SPAN>
form to refer back to the port. Since this example is from a PCB design, the terminals have pin numbers that correspond to the IC package leads. The pin numbers are defined in the <SPAN CLASS="BodyComputer">
designator</SPAN>
form with the pin number as a string. The polarity of the pin is indicated by the <SPAN CLASS="BodyComputer">
direction</SPAN>
form, which may be <SPAN CLASS="BodyComputer">
INPUT</SPAN>
, <SPAN CLASS="BodyComputer">
OUTPUT</SPAN>
, or <SPAN CLASS="BodyComputer">
INOUT</SPAN>
. If the pin is an output pin, its <SPAN CLASS="BodyComputer">
Drive</SPAN>
can be represented by <SPAN CLASS="BodyComputer">
dcMaxFanout</SPAN>
and if it is an input pin its <SPAN CLASS="BodyComputer">
Load</SPAN>
can be represented by <SPAN CLASS="BodyComputer">
dcFanoutLoad</SPAN>
. The <SPAN CLASS="BodyComputer">
port</SPAN>
form can also contain forms <SPAN CLASS="BodyComputer">
unused</SPAN>
, <SPAN CLASS="BodyComputer">
dcMaxFanin</SPAN>
, <SPAN CLASS="BodyComputer">
dcFaninLoad</SPAN>
, <SPAN CLASS="BodyComputer">
acLoad</SPAN>
, and <SPAN CLASS="BodyComputer">
portDelay</SPAN>
. All other attributes for pins besides <SPAN CLASS="BodyComputer">
PinNumber</SPAN>
, <SPAN CLASS="BodyComputer">
Polarity</SPAN>
, <SPAN CLASS="BodyComputer">
Load</SPAN>
, and <SPAN CLASS="BodyComputer">
Drive</SPAN>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?