coriolis/lefdef/doc/lefdefref/WorkingwithLEF.html

571 lines
34 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN" "http://www.w3.org/MarkUp/Wilbur/HTML32.dtd">
<html xmlns="http://www.w3.org/MarkUp/Wilbur/HTML32.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>LEF/DEF 5.8 Language Reference -- 3</title>
<META NAME="Approver" CONTENT="Technical Publications">
<META NAME="Author" CONTENT="Technical Publications">
<META NAME="CreateDate" CONTENT="2017-04-26">
<META NAME="CreateTime" CONTENT="1493186673">
<META NAME="DataType" CONTENT="Manuals">
<META NAME="Description" CONTENT="Describes the syntax for Library Exchange Format (LEF) and Design Exchange Format (DEF) files.">
<META NAME="DocTitle" CONTENT="LEF/DEF 5.8 Language Reference">
<META NAME="DocType" CONTENT="Reference">
<META NAME="EdmsRelease" CONTENT="FM-Wiki-1.0_P005">
<META NAME="FileTitle" CONTENT="3">
<META NAME="Keywords" CONTENT="">
<META NAME="FileType" CONTENT="Chapter">
<META NAME="Keyword" CONTENT="lefdefref">
<META NAME="Language" CONTENT="English">
<META NAME="ModifiedDate" CONTENT="2017-04-26">
<META NAME="ModifiedTime" CONTENT="1493186673">
<META NAME="NextFile" CONTENT="DEFSyntax.html">
<META NAME="PageCount" CONTENT="6">
<META NAME="Platform" CONTENT="ALL">
<META NAME="PrevFile" CONTENT="DEFINEandALIAS.html">
<META NAME="Product" CONTENT="Innovus, Languages">
<META NAME="ProductFamily" CONTENT="Digital Implementation, Cadence Shared Tools">
<META NAME="ProductVersion" CONTENT="5.8">
<META NAME="Syntax" CONTENT="MACRO abc...PIN a ... PORT # dummy pin-port, do not END # include these two linesEND a...">
<META NAME="RightsManagement" CONTENT="Copyright 2017 Cadence Design Systems Inc.">
<META NAME="Title" CONTENT="LEF/DEF 5.8 Language Reference -- 3">
<META NAME="TopicTags" CONTENT="FALSE">
<META NAME="Version" CONTENT="5.8">
</head>
<body style="margin-left: 5%;">
<a name="pagetop"></a>
<a name="firstpage"></a>
<!-- Begin Buttons -->
<table width="650" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="36" width="650" colspan="10">
<img src="images/header_doc.gif" width="650" height="34">
</td>
</tr>
<tr>
<td height="20" width="59">
<a href="javascript:openLibrary()"><img src="../support/nav2_library.gif" border="0" alt="View Library" height="20" width="59"></a>
</td>
<td height="20" width="73">
<a href="lefdefrefTOC.html"><img src="../support/nav2_toc.gif" alt="Table of Contents" border="0"></a>
</td>
<td height="20" width="46">
<a href="lefdefrefIX.html"><img src="../support/nav2_index.gif" border="0"></a>
</td>
<td>
<a href="DEFINEandALIAS.html"><img src="images/nav2_previous.gif" alt="Previous" border="0"></a>
</td>
<td>
<a href="DEFSyntax.html"><img src="images/nav_next.gif" alt="Next" border="0"></a>
</td>
<td height="20">
<a>
<a href="lefdefref.pdf"><img src="../support/nav2_print.gif" border="0" alt="Open PDF to print book" height="20" width="114"></a>
</a>
</td>
<td height="20" width="61">
<img src="../support/nav2_black.gif" border="0" height="20" width="76">
</td>
<td height="20" width="76">
<a href="/feedback.htm"><img src="../support/nav2_feedback.gif" border="0" alt="Email Comments" height="20" width="76"></a>
</td>
<td height="20" width="43">
<a href="../cdsuser/help.html"><img src="../support/nav2_help.gif" border="0" alt="Help Using Documentation" height="20" width="43"></a>
</td>
<td height="20" width="37">
<a href="/exitsearch.htm"><img src="../support/nav2_exit.gif" border="0" alt="Shut Down Cadence Documentation Server" height="20" width="37"></a>
</td>
</tr>
</table>
<!-- End Buttons -->
<p>
<hr>
<p>
<h3>
<center>
<font >
<div>LEF&#47;DEF 5.8 Language Reference</div>
<font >
<div></div>
</font>
</font>
</center>
</h3>
<br>
</p>
<div>
<h1>3<a name="918624">&nbsp;</a></h1>
<h1><a name="922000">Working with LEF</a></h1>
<p><a name="922001">This chapter contains information about the following topics. </a></p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a href="#918646" title="3" name="922005"><font color="Blue"><u>Incremental LEF</u></font></a><a href="#918646" title="3"> </a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a href="#Error Checking" title="3" name="921485"><font color="Blue"><u>Error Checking</u></font></a><a href="#Error Checking" title="3"> </a></td>
</tr>
</table>
</div>
<h2><a name="918646">Incremental LEF</a></h2>
<p><a name="918647"><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font></a> can add new data to the current database, providing an incremental LEF capability. Although it is possible to put an entire LEF library in one file, some systems require that you put certain data in separate files. </p>
<p><a name="918648">This feature also is useful, for example, when combined with the </a><font size="2" face="'Courier New'" color="#000000">INPUT GDSII</font> command, to extract geometric data from a GDSII&#45;format file and add the data to the database. </p>
<p><a name="918649">When using </a><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> on a database that has been modified previously, save the previous version before invoking <font size="2" face="'Courier New'" color="#000000">INPUT LEF</font>. This provides a backup in case the library information has problems and the database gets corrupted or lost.</p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="13.333333333333332">
<div>&nbsp;</div>
</td>
<td width="133.33333333333331">
<div>
<nobr>
<font size="3"><img src="images/important.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td>
<font size="3"><a name="918652">The original LEF file, created with </a><font size="2" face="'Courier New'" color="#000000">FINPUT LEF</font> (or with <font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> when no database is loaded), must contain all the layers.</font>
</td>
</tr>
</table>
</div>
<h4><a name="918653">Adding Objects to the Library</a></h4>
<p><a name="918654"><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font></a> can add the following objects to the database:</p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918655">New via</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918656">New via rule</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918657">Samenet spacings (if none have been specified previously)</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918658">New macro</a></td>
</tr>
</table>
</div>
<p><a name="918659">If geometries have not been specified for an existing via, </a><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> can add layers and associated rectangle geometries. If not specified previously for a macro,<strong> </strong><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> can add the following:</p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918660"><font size="2" face="'Courier New'" color="#000000">FOREIGN</font></a> statement</td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918661">EEQ</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918662">LEQ</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918663">Size</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918664">Overlap geometries</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918665">Obstruction geometries</a></td>
</tr>
</table>
</div>
<p><a name="918666">If not previously specified for an existing macro pin, </a><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> can add the following:</p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918667">Mustjoins</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918668">Ports and geometries</a></td>
</tr>
</table>
</div>
<p><a name="918669">The database created by </a><font size="2" face="'Courier New'" color="#000000">INPUT LEF</font> can contain a partial library. Run <font size="2" face="'Courier New'" color="#000000">VERIFY LIBRARY</font> before proceeding. </p>
<p><a name="918670">If new geometries are added to a routed database, run </a><font size="2" face="'Courier New'" color="#000000">VERIFY GEOMETRY</font> and <font size="2" face="'Courier New'" color="#000000">VERIFY CONNECTIVITY</font> to identify new violations.</p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="13.333333333333332">
<div>&nbsp;</div>
</td>
<td width="133.33333333333331">
<div>
<nobr>
<font size="3"><img src="images/important.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td>
<font size="3"><a name="918671">When defining a pin with no port geometries with the intent of incrementally adding them, </a><font color="#000000"><em>do not</em></font> include an empty <font size="2" face="'Courier New'" color="#000000">PORT</font> statement as shown below.</font>
</td>
</tr>
</table>
</div>
<dl>
<font size="2" face="'Courier New'" color="#000000"><a name="923027">MACRO abc<dd>...<dd>PIN a<dd> ...<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PORT # dummy pin&#45;port, do not<dd>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END # include these two lines<dd>END a<dd>...</a></font>
</dl>
<h2><a name="Error Checking"></a><a name="918868">Error Checking</a></h2>
<p><a name="918871">To help develop, test, and debug generic libraries and parametric macros, LEF and DEF have a user&#45;defined error checking facility. This facility consists of seven utilities that you can use from within a LEF or DEF file during the scanning phase of LEF&#47;DEF readers. These utilities have the following features:</a></p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918872">A message facility that writes to one or more text files during LEF or DEF input</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918873">An error handling facility that logs user detected warnings, errors, and fatal errors</a></td>
</tr>
</table>
</div>
<p><a name="918874">The error checking utilities have the following syntax:</a></p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918875">&amp;CREATEFILE &amp;fileAlias = <br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;</a><font size="2" face="'Courier New'" color="#000000"><em>stringExpression</em></font> <br>&nbsp;&nbsp;&nbsp;&nbsp;| <font size="2" face="'Courier New'" color="#000000"><em>stringIF</em></font><font color="#000000"><em>&#45;</em></font><font size="2" face="'Courier New'" color="#000000"><em>ELSEexpression</em></font>&nbsp;}&nbsp;;</font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918876">&amp;OPENFILE &amp;fileAlias&nbsp;;</a></font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918877">&amp;CLOSEFILE &amp;fileAlias&nbsp;;</a></font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918878">&amp;MESSAGE <br>&nbsp;&nbsp;&nbsp;&nbsp;{&amp;fileAlias | &amp;MSGWINDOW} = </a><font size="2" face="'Courier New'" color="#000000"><em>message</em></font>;</font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918879">&amp;WARNING <br>&nbsp;&nbsp;&nbsp;&nbsp;{&amp;fileAlias | &amp;MSGWINDOW} = </a><font size="2" face="'Courier New'" color="#000000"><em>message</em></font>&nbsp;;</font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918880">&amp;ERROR <br>&nbsp;&nbsp;&nbsp;&nbsp;{&amp;fileAlias | &amp;MSGWINDOW} = </a><font size="2" face="'Courier New'" color="#000000"><em>message</em></font>&nbsp;;</font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918881">&amp;FATALERROR <br>&nbsp;&nbsp;&nbsp;&nbsp;{&amp;fileAlias | &amp;MSGWINDOW} = </a><font size="2" face="'Courier New'" color="#000000"><em>message</em></font>;</font>
</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918883"><font size="2" face="'Courier New'" color="#000000"><em>message</em></font></a> =<br>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&amp;fileAlias | <font size="2" face="'Courier New'" color="#000000"><em>stringExpression</em></font> <br>&nbsp;&nbsp;&nbsp;&nbsp;| <font size="2" face="'Courier New'" color="#000000"><em>stringIF</em></font><font color="#000000"><em>&#45;</em></font><font size="2" face="'Courier New'" color="#000000"><em>ELSEexpression<br></em></font>&nbsp;&nbsp;&nbsp;&nbsp;| <font size="2" face="'Courier New'" color="#000000"><em>stringIFexpression</em></font>&nbsp;}</font>
</p>
<h3><a name="Message Facility"></a><a name="918885">Message Facility</a></h3>
<p><a name="918886">The message facility outputs user&#45;defined messages during the scanning phase of LEF and DEF input. These messages can be directed to the message window.</a></p>
<h4>
<em></em>
<em><a name="918887">&amp;CREATEFILE</a></em>
</h4>
<p><a name="918888">The </a><font size="2" face="'Courier New'" color="#000000">&amp;CREATEFILE</font> utility first assigns a token (<font color="#000000"><em>&amp;fileAlias</em></font>) to represent a named file. The file name is derived from a previously defined string, a quoted string, or an <font size="2" face="'Courier New'" color="#000000">IF&#45;ELSE</font> expression that evaluates to a string. The following example illustrates these three cases.</p>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918889">&amp;DEFINES &amp;messagefile = &#34;demo1.messages&#34;&nbsp;;<br>&amp;CREATEFILE &amp;outfile = &amp;messagefile&nbsp;;<br>&amp;CREATEFILE &amp;msgs = <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#34;&#47;usr&#47;asics&#47;cmos&#47;fif4&#47;errors.txt&#34;&nbsp;;<br>&amp;CREATEFILE &amp;messages = <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF &amp;errortrap <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THEN &#34;errs.txt&#34;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELSE &#34;&#47;dev&#47;null&#34;&nbsp;;</a></font>
</p>
<p><a name="918890">The derived file name must be a legal file name in the host environment. The default directory is the current working directory. The file names are case sensitive.</a></p>
<p><a name="918891"><font size="2" face="'Courier New'" color="#000000">&amp;CREATEFILE</font></a> creates an empty file with the given name and opens the file. If the token is already bound to another open file, a warning is issued, the file is closed, and the new file is opened. If the file already exists, the version number is incremented.</p>
<h4>
<em></em>
<em><a name="918892">&amp;CLOSEFILE and &amp;OPENFILE</a></em>
</h4>
<p><a name="918893">The </a><font size="2" face="'Courier New'" color="#000000">&amp;CLOSEFILE</font> utility closes the file bound to a given token; <font size="2" face="'Courier New'" color="#000000">&amp;OPENFILE</font> opens the file bound to a given token. <font size="2" face="'Courier New'" color="#000000">&amp;CLOSEFILE</font> and <font size="2" face="'Courier New'" color="#000000">&amp;OPENFILE </font>control the number of open files. Each operating system has a limit for the number of open files. Therefore, <font size="2" face="'Courier New'" color="#000000">&amp;CLOSEFILE</font> might be needed to free up extra file descriptors. </p>
<p><a name="918894">Files are closed in the following ways.</a></p>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918895">All user files are closed at the end of the scanning phase of the LEF and DEF readers.</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918896">All user files are closed if the scanning phase aborts.</a></td>
</tr>
</table>
</div>
<div>
<table border="0" cellspacing="0" cellpadding="3" summary="">
<tr valign="baseline">
<td width="31.999679999999998">
<div>
<nobr>
<font color="#000000"><img src="images/b_bullet.gif" alt="ParagraphBullet" border="0"></font>
</nobr>
</div>
</td>
<td><a name="918897">If </a><font size="2" face="'Courier New'" color="#000000">&amp;CREATEFILE</font> is invoked with a token that is already bound to an open file, that file is closed before opening the new file.</td>
</tr>
</table>
</div>
<h4>
<em></em>
<em><a name="918898">&amp;MESSAGE</a></em>
</h4>
<p><a name="918899">The </a><font size="2" face="'Courier New'" color="#000000">&amp;MESSAGE</font> utility appends text to the file represented by the <font color="#000000"><em>&amp;fileAlias </em></font>token, or to the message window if <font size="2" face="'Courier New'" color="#000000">&amp;MSGWINDOW </font>is specified.</p>
<p><a name="918900"><font size="2" face="'Courier New'" color="#000000">&amp;MSGWINDOW</font></a> is a special file alias that is not created, opened, or closed. The assigned expression (right side of the statement) can be one of the following:</p>
<p>
<strong></strong>
<strong><a name="918901"><font size="2" face="'Courier New'" color="#000000"><em>&amp;fileAlias</em></font></a></strong>
</p>
<blockquote><a name="923664">Must correspond to a valid file that has been successfully opened. The contents of the file are appended to the target file (or message window).</a></blockquote>
<p>
<strong></strong>
<strong><a name="923672"><font size="2" face="'Courier New'" color="#000000"><em>stringExpression</em></font></a></strong>
</p>
<blockquote><a name="923709">Either a string or a string token.<br><br>For example:</a></blockquote>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="923710">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;DEFINES &amp;romword16 = <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#34;ROM word size = 16 bits&#34;&nbsp;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;MESSAGE &amp;mesgs = &#34;ROM size = 256&#34;&nbsp;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;MESSAGE &amp;mesgs = &amp;romword16&nbsp;;</a></font>
</p>
<p>
<strong></strong>
<strong><a name="918905"><font size="2" face="'Courier New'" color="#000000"><em>stringIF&#45;ELSEexpression</em></font></a></strong>
</p>
<blockquote><a name="923718">String </a><font size="2" face="'Courier New'" color="#000000">IF&#45;ELSE</font> expressions evaluate a Boolean expression and then branch to string values, for example:</blockquote>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918906">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;&amp;MESSAGE &amp;mesgs =<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF (&amp;&amp;c_flag = 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THEN &#34;FLAG C set to 0&#34;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELSE IF (&nbsp;&amp;&amp;c_flag = 1&nbsp;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THEN &#34;FLAG C set to 1&#34;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELSE &#34;FLAG C set to 2&#34;&nbsp;;</a></font>
</p>
<blockquote><a name="918907">As shown in this example, </a><font size="2" face="'Courier New'" color="#000000">IF&#45;ELSE</font> expressions can be nested.</blockquote>
<p>
<strong></strong>
<strong><a name="923730"><font size="2" face="'Courier New'" color="#000000"><em>stringIFexpression</em></font></a></strong>
</p>
<blockquote><a name="923737">A string </a><font size="2" face="'Courier New'" color="#000000">IF</font> expression is an <font size="2" face="'Courier New'" color="#000000">IF&#45;ELSE</font> expression without the <font size="2" face="'Courier New'" color="#000000">ELSE</font> phrase. The Boolean expression is evaluated, and if true, the <font size="2" face="'Courier New'" color="#000000">THEN</font> string is sent to the target file; if false, no string is sent, for example,</blockquote>
<p>
<font size="2" face="&quot;Courier New&quot;" color="#000000"><a name="918909">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;MESSAGE &amp;mesgs = <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IF (&nbsp;&amp;&amp;buf = &#34;INV_BIG&#34;&nbsp;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THEN &#34;INV_BIG buffers&#34;&nbsp;;</a></font>
</p>
<p><a name="918910">Neither the file alias token nor </a><font size="2" face="'Courier New'" color="#000000">&amp;MSGWINDOW</font> can be part of the assigned expression.</p>
<h3><a name="Error-Checking Facility"></a><a name="918911">Error&#45;Checking Facility</a></h3>
<p><a name="918913">In addition to the message facility, you have partial control of the error checking facility of the LEF and DEF readers. When scanning LEF or DEF input, the readers record warnings, errors, and fatal errors. At the end of the scan, the total number of each is sent to the message window before proceeding with the reader phase. </a></p>
<p><a name="918914">If a fatal error is detected, input is aborted after the scanning phase.</a></p>
<p><a name="918915">With the user interface to the error checking facility, the LEF and DEF files can include custom error checking. User detected warnings, errors, and fatal errors, can be logged, thereby incrementing the DEF&#47;LEF reader's warning, error, and fatal error counts. </a></p>
<p><a name="918916">A user&#45;detected fatal error terminates input just as with the resident error checking facility. In addition, the user defined error checking facility utilities can send message strings to the message window.</a></p>
<h4>
<em></em>
<em><a name="918917">&amp;WARNING, &amp;ERROR, and &amp;FATALERROR </a></em>
</h4>
<p><a name="918918">The </a><font size="2" face="'Courier New'" color="#000000">&amp;WARNING</font>, <font size="2" face="'Courier New'" color="#000000">&amp;ERROR</font>, and <font size="2" face="'Courier New'" color="#000000">&amp;FATALERROR</font> utilities use the same syntax as the <font size="2" face="'Courier New'" color="#000000">&amp;MESSAGE</font> utility. These utilities can send message strings to files and to the message window in the same manner as <font size="2" face="'Courier New'" color="#000000">&amp;MESSAGE</font>. In addition, when the assigned expression is a string <font size="2" face="'Courier New'" color="#000000">IF</font> expression, or a string <font size="2" face="'Courier New'" color="#000000">IF&#45;ELSE</font> expression, then the associated counter (warnings, errors, or fatal errors) is incremented by 1 if any <font size="2" face="'Courier New'" color="#000000">IF</font> condition evaluates to true.</p>
</div>
<br>
<a href="#pagetop">Return to top of page</a>
<hr>
<hr align="left">
<div style="text-align: left;">
<!-- Begin Buttons -->
<table width="650" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="20" width="59">
<a href="javascript:openLibrary()"><img src="../support/nav2_library.gif" border="0" alt="View Library" height="20" width="59"></a>
</td>
<td height="20" width="73">
<a href="lefdefrefTOC.html"><img src="../support/nav2_toc.gif" alt="Table of Contents" border="0"></a>
</td>
<td height="20" width="46">
<a href="lefdefrefIX.html"><img src="../support/nav2_index.gif" border="0"></a>
</td>
<td>
<a href="DEFINEandALIAS.html"><img src="images/nav2_previous.gif" alt="Previous" border="0"></a>
</td>
<td>
<a href="DEFSyntax.html"><img src="images/nav_next.gif" alt="Next" border="0"></a>
</td>
<td>
<a>
<a href="lefdefref.pdf"><img src="../support/nav2_print.gif" border="0" alt="Open PDF to print book" height="20" width="114"></a>
</a>
</td>
<td height="20" width="61">
<img src="../support/nav2_black.gif" border="0" height="20" width="76">
</td>
<td height="20" width="76">
<a href="/feedback.htm"><img src="../support/nav2_feedback.gif" border="0" alt="Email Comments" height="20" width="76"></a>
</td>
<td height="20" width="43">
<a href="../cdsuser/help.html"><img src="../support/nav2_help.gif" border="0" alt="Help Using Documentation" height="20" width="43"></a>
</td>
<td height="20" width="37">
<a href="/exitsearch.htm"><img src="../support/nav2_exit.gif" border="0" alt="Shut Down Cadence Documentation Server" height="20" width="37"></a>
</td>
</tr>
</table>
<!-- End Buttons -->
</div>
<br>
<font size="-1" >
For support, see <a href="http://support.cadence.com" target="_blank">Cadence Online Support</a> service.</font>
<br>
<br>
<font size="-1" >
<font size="-1"><i>Copyright &#169; 2016, <a href ="http://www.cadence.com">Cadence Design Systems, Inc.</a></i></font>
</font>
<br>
<font size="-1" >
All rights reserved.</font>
<br>
<br>
</body>
</html>