1678 lines
218 KiB
HTML
1678 lines
218 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 5.8 C/C++ Programming Interface -- 4</title>
|
|||
|
<META NAME="Approver" CONTENT="Technical Publications">
|
|||
|
<META NAME="Author" CONTENT="Technical Publications">
|
|||
|
<META NAME="CreateDate" CONTENT="2017-04-12">
|
|||
|
<META NAME="CreateTime" CONTENT="1491994561">
|
|||
|
<META NAME="DataType" CONTENT="Manuals">
|
|||
|
<META NAME="Description" CONTENT="Describes the C/C++ programming interface used to read and write Library Exchange Format (LEF) files.">
|
|||
|
<META NAME="DocTitle" CONTENT="LEF 5.8 C/C++ Programming Interface">
|
|||
|
<META NAME="DocType" CONTENT="Reference">
|
|||
|
<META NAME="EdmsRelease" CONTENT="FM-Wiki-1.0_P005">
|
|||
|
<META NAME="FileTitle" CONTENT="4">
|
|||
|
<META NAME="Keywords" CONTENT="">
|
|||
|
<META NAME="FileType" CONTENT="Chapter">
|
|||
|
<META NAME="Keyword" CONTENT="lefapi">
|
|||
|
<META NAME="Language" CONTENT="English">
|
|||
|
<META NAME="ModifiedDate" CONTENT="2017-04-12">
|
|||
|
<META NAME="ModifiedTime" CONTENT="1491994561">
|
|||
|
<META NAME="NextFile" CONTENT="ch5LEFwritercallback.html">
|
|||
|
<META NAME="PageCount" CONTENT="52">
|
|||
|
<META NAME="Platform" CONTENT="ALL">
|
|||
|
<META NAME="PrevFile" CONTENT="ch3LEFcallback.html">
|
|||
|
<META NAME="Product" CONTENT="Languages">
|
|||
|
<META NAME="ProductFamily" CONTENT="Cadence Shared Tools">
|
|||
|
<META NAME="ProductVersion" CONTENT="5.8">
|
|||
|
<META NAME="Syntax" CONTENT=" // Check if PROPERTY is defined in the macro propNum = macroInfo->numProperties(); if (propNum > 0) { printf(" PROPERTY "); for (i = 0; i < propNum; i++) { // value can either be a string or number if (macroInfo->propValue(i)) { printf("%s %s ", macroInfo->propName(i), macroInfo->propValue(i)); } else printf("%s %g ", macroInfo->propName(i), macroInfo->propNum(i)); } printf("\n"); } return 0;}, // Check if SITE pattern is defined in the macro if (macroInfo->hasSitePattern()) { for (i = 0; i < macroInfo->numSitePattern(); i++ ) { pattern = macroInfo->sitePattern(i); printf(" SITE %s %g %g %d DO %g BY %g STEP %g %g\n", pattern->name(), pattern->x(), pattern->y(), pattern->orient(), pattern->xStart(), pattern->yStart(), pattern->xStep(), pattern->yStep()); } }, // Check if the type is correct if (type != lefrMacroCbkType) { printf("Type is not lefrMacroCbkType, terminate parsing.\n"); return 1; } if (macroInfo->hasClass()) printf(" CLASS %s\n", macroInfo->macroClass());, // Check if the type is correct if (type != lefrPinCbkType) { printf("Type is not lefrPinCbkType, terminate parsing.\n"); return 1; }, // Check if the type is correct if (type != lefrPropBeginCbkType) { printf("Type is not lefrPropBeginCbkType, terminate parsing.\n"); return 1; }, // Check if the type is correct if (type != lefrPropCbkType) { printf("Type is not lefrPropCbkType, terminate parsing.\n"); return 1; }, // Check if the type is correct if (type != lefrPropEndCbkType) { printf("Type is not lefrPropEndCbkType, terminate parsing.\n"); return 1;} printf("END PROPERTYDEFINITIONS\n"); return 0;}, // Check if the type is correct if (type != lefrSiteCbkType) { printf("Type is not lefrSiteCbkType, terminate parsing.\n"); return 1; }, // Check if the type is correct if (type != lefrSpacingCbkType) { printf("Type is not lefrSpacingCbkType, terminate parsing.\n"); return 1; }, // Check if the type is correct if (type != lefrUnitsCbkType) { printf("Type is not lefrUnitsCbkType, terminate parsing.\n"); return 1;}, // Check the object type of the property definition if (strcmp(propInfo->propType(), "library") == 0) printf("LIBRARY %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "pin") == 0) printf("PIN %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "macro") == 0) printf("MACRO %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "via") == 0) printf("VIA %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "viarule") == 0) printf("VIARULE %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "layer") == 0) printf("LAYER %s ", propInfo->propName()); else if (strcmp(propInfo->propType(), "nondefaultrule") == 0 printf("NONDEFAULTRULE %s ", propInfo->propName());, // Check the property type if (propInfo->dataType() == <20>I<EFBFBD>) printf("INTEGER "); if (propInfo->dataType() == <20>R<EFBFBD>) printf("REAL "); if (propInfo->dataType() == <20>S<EFBFBD>) printf("STRING "); if (propInfo->dataType() == <20>Q<EFBFBD>) printf("STRING "); if (propInfo->hasRange()) { printf("RANGE %g %g ", propInfo->left(), propInfo->right()); } if (propInfo->hasNumber()) printf("%g ",
|
|||
|
<META NAME="RightsManagement" CONTENT="Copyright 2017 Cadence Design Systems Inc.">
|
|||
|
<META NAME="Title" CONTENT="LEF 5.8 C/C++ Programming Interface -- 4">
|
|||
|
<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="lefapiTOC.html"><img src="../support/nav2_toc.gif" alt="Table of Contents" border="0"></a>
|
|||
|
</td>
|
|||
|
|
|||
|
<td height="20" width="46">
|
|||
|
<img src="../support/nav2_index_b.gif" border="0">
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="ch3LEFcallback.html"><img src="images/nav2_previous.gif" alt="Previous" border="0"></a>
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="ch5LEFwritercallback.html"><img src="images/nav_next.gif" alt="Next" border="0"></a>
|
|||
|
</td>
|
|||
|
<td height="20">
|
|||
|
<a>
|
|||
|
<a href="lefapi.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 5.8 C/C++ Programming Interface (Open Licensing Program)</div>
|
|||
|
<font >
|
|||
|
<div></div>
|
|||
|
</font>
|
|||
|
</font>
|
|||
|
</center>
|
|||
|
</h3>
|
|||
|
<br>
|
|||
|
</p>
|
|||
|
<div>
|
|||
|
<h1>4<a name="1008781"> </a></h1>
|
|||
|
<h1><a name="1011663">LEF Reader Classes</a></h1>
|
|||
|
<p><a name="1014136">This chapter contains the following sections:</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="#1039989" title="4" name="1039990"><font color="#0000ff"><u>Introduction</u></font></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="#1031286" title="4" name="1039991"><font color="#0000ff"><u>Callback Style Interface</u></font></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="#1031187" title="4" name="1039992"><font color="Blue"><u>Retrieving Repeating LEF Data</u></font></a><a href="#1031187" title="4"> </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="#1031283" title="4" name="1039993"><font color="Blue"><u>Deriving C Syntax from C++ Syntax</u></font></a><a href="#1031283" title="4"> </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="#1064282" title="4" name="1039994"><font color="Blue"><u>LEF Reader Classes</u></font></a><a href="#1064282" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h2><a name="1039989">Introduction</a></h2>
|
|||
|
<p><a name="1031247">Every statement in the Cadence</a><font color="#000000"><sup>®</sup></font> Library Exchange Format (LEF) file is associated with a LEF reader class. When the LEF reader uses a callback, it passes a pointer to the appropriate class. You can use the member functions in each class to retrieve data defined in the LEF file.</p>
|
|||
|
<p><a name="1031245">For a list of the LEF Reader Classes that correspond to LEF file syntax, see </a><a href="#1064282" title="4"><font color="Blue"><u>"LEF Reader Classes"</u></font></a><a href="#1064282" title="4"></a>.</p>
|
|||
|
<h2><a name="1031286">Callback Style Interface</a></h2>
|
|||
|
<p><a name="1031289">This programming interface uses a callback style interface. You register for the constructs that interest you, and the readers call your callback functions when one of those constructs is read. If you are not interested in a given set of information, you simply do not register the callback; the reader scans the information quickly and proceeds.</a></p>
|
|||
|
<div>
|
|||
|
<table border="0" cellspacing="0" cellpadding="3" summary="">
|
|||
|
<tr valign="baseline">
|
|||
|
<td width="13.333333333333332">
|
|||
|
<div> </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="1030736">Returned data is not static. If you want to keep the data, you must copy it. </a></font>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h2><a name="1031187">Retrieving Repeating LEF Data</a></h2>
|
|||
|
<p><a name="1031239">Many LEF objects contain repeating objects or specifications. The classes that correspond to these LEF objects contain an index and array of elements that let you retrieve the data iteratively. </a></p>
|
|||
|
<p><a name="1031220">You can use a </a><font size="2" face="'Courier New'" color="#000000">for</font> loop from <font size="2" face="'Courier New'" color="#000000">0</font> to the number of items specified in the index. In the loop, retrieve the data from the subsequent arrays. For example:</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058306">for (i = 0; i < layer->lefiLayer::numMinstep(); i++) {</a></font>
|
|||
|
</p>
|
|||
|
<blockquote>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"></font>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058317"> fprintf(fout, " MINSTEP %g ", layer->lefiLayer::minstep(i));</a></font>
|
|||
|
</blockquote>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058308"> if (layer->lefiLayer::hasMinstepType(i))</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058309"> fprintf(fout, "%s ", layer->lefiLayer::minstepType(i));</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058310"> if (layer->lefiLayer::hasMinstepLengthsum(i))</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058311"> fprintf(fout, "LENGTHSUM %g ",</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058312"> layer->lefiLayer::minstepLengthsum(i));</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058313"> fprintf(fout, ";\n");</a></font>
|
|||
|
</p>
|
|||
|
<p>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058314"> }</a></font>
|
|||
|
</p>
|
|||
|
<h2><a name="1031283">Deriving C Syntax from C++ Syntax</a></h2>
|
|||
|
<p><a name="1031300">The Cadence application programming interface (API) provides both C and C++ interfaces. The C API is generated from the C++ source, so there is no functional difference. The C API has been created in a pseudo object-oriented style. Examining a simple case should enable you to understand the API organization.</a></p>
|
|||
|
<p><a name="1032142">The following examples show the same statements in C and C++ syntax.</a></p>
|
|||
|
<h3><a name="1031310">C++ Syntax</a></h3>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058322">class lefiSite {<dd> const char* name() const;<dd> int hasClass() const;<dd> const char* siteClass() const;<dd> double sizeX() const;<dd> double sizeY() const;<dd> int numSites() const;<dd> char* siteName(int index) const;<dd> int siteOrient(int index) const;<dd> char* siteOrientStr(int index) const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058339">};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1036592">C Syntax</a></h3>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058340">const char * lefiSite_name<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058344">int lefiSite_hasClass<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058347">const char * lefiSite_siteClass<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058350">double lefiSite_sizeX<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058352">double lefiSite_sizeY<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058355">int lefiSite_numSites<dd> ( const lefiSite * this );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058358">char * lefiSite_siteName<dd> ( const lefiSite * this, int index );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058361">int lefiSite_siteOrient<dd> ( const lefiSite * this, int index );</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058364">char * lefiSite_siteOrientStr<dd> ( const lefiSite * this, int index );</a></font>
|
|||
|
</dl>
|
|||
|
<p><a name="1063669"> </a></p>
|
|||
|
<p><a name="1063707">The C routine prototypes for the API functions can be found in the following files:</a></p>
|
|||
|
<table summary="" border="0" cellpadding="4" cellspacing="0" bordercolor="#D3D3D3" width="548">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top" width="182">
|
|||
|
<p><a name="1063672">lefiArray.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top" width="182">
|
|||
|
<p><a name="1063674">lefiNonDefault.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top" width="182">
|
|||
|
<p><a name="1063676">lefiViaRule.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063678">lefiCrossTalk.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063680">lefrCallBacks.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063682">lefiProp.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063684">lefrReader.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063686">lefiDebug.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063688">lefiDefs.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063690">lefwWriter.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063692">lefiKRDefs.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063694">lefiLayer.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063696">lefiUnits.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063698">lefiUser.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063715">lefiMacro.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063702">lefiUtil.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063704">lefiMisc.h</a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1063706">lefiVia.h</a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h2><a name="1064282">LEF Reader Classes</a></h2>
|
|||
|
<p><a name="1064479">The following table lists the classes routines that apply to the LEF information. </a></p>
|
|||
|
<table summary="" border="0" cellpadding="4" cellspacing="0" bordercolor="#D3D3D3" width="552">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="0" bordercolor="#D3D3D3" valign="middle" width="242">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1064285"><font color="#000000"><strong>LEF Information</strong></font></a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="0" bordercolor="#D3D3D3" valign="middle" width="309">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1064287">LEF Class</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1064481" title="4" name="1064292"><font color="#0000ff"><u>Layer Classes</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiAntennaModel" title="4" name="1064297"><font color="#0000ff"><u>lefiAntennaModel</u></font></a> <br><a href="#lefiAntennaPWL" title="4"><font color="#0000ff"><u>lefiAntennaPWL</u></font></a><br><a href="#lefiInfluence" title="4"><font color="#0000ff"><u>lefiInfluence</u></font></a><br><a href="#lefiLayer" title="4"><font color="#0000ff"><u>lefiLayer</u></font></a><br><a href="#lefiLayerDensity" title="4"><font color="#0000ff"><u>lefiLayerDensity</u></font></a><br><a href="#lefiOrthogonal" title="4"><font color="#0000ff"><u>lefiOrthogonal</u></font></a><br><a href="#lefiParallel" title="4"><font color="#0000ff"><u>lefiParallel</u></font></a><br><a href="#lefiSpacingTable" title="4"><font color="#0000ff"><u>lefiSpacingTable</u></font></a><br><a href="#lefiTwoWidths" title="4"><font color="#0000ff"><u>lefiTwoWidths</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1037350" title="4" name="1064326"><font color="#0000ff"><u>Macro Data Classes</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiDensity" title="4" name="1064331"><font color="#0000ff"><u>lefiDensity</u></font></a><br><a href="#lefiMacro" title="4"><font color="#0000ff"><u>lefiMacro</u></font></a><br><a href="#1062978" title="4"><font color="#0000ff"><u>lefiMacroForeign</u></font></a><br><a href="#1063114" title="4"><font color="#0000ff"><u>lefiMacroSite</u></font></a><br><a href="#1057954" title="4"><font color="#0000ff"><u>lefiPoints</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1063842" title="4" name="1064348"><font color="#0000ff"><u>Macro Obstruction Class</u></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1014271" title="4" name="1064353"><font color="#0000ff"><u>lefiObstruction</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#MacroPinRoutines" title="4" name="1064358"><font color="#0000ff"><u>Macro Pin Classes</u></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiGeometries" title="4" name="1064363"><font color="#0000ff"><u>lefiGeometries</u></font></a><br><a href="#lefiPin" title="4"><font color="#0000ff"><u>lefiPin</u></font></a><br><a href="#lefiPinAntennaModel" title="4"><font color="#0000ff"><u>lefiPinAntennaModel</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1037937" title="4" name="1064374"><font color="#0000ff"><u>Maximum Via Stack Class</u></font></a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiMaxStackVia" title="4" name="1064379"><font color="#0000ff"><u>lefiMaxStackVia</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1057802" title="4" name="1064384"><font color="#0000ff"><u>Miscellaneous Class</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiUserData" title="4" name="1064389"><font color="#0000ff"><u>lefiUserData</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038008" title="4" name="1064394"><font color="#0000ff"><u>Nondefault Rule Class</u></font></a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiNonDefault" title="4" name="1064399"><font color="#0000ff"><u>lefiNonDefault</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038123" title="4" name="1064404"><font color="#0000ff"><u>Property Definition Classes</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiProp" title="4" name="1064409"><font color="#0000ff"><u>lefiProp</u></font></a><br><a href="#lefiPropType" title="4"><font color="#0000ff"><u>lefiPropType</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038189" title="4" name="1064414"><font color="#0000ff"><u>Same-Net Spacing Class</u></font></a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiSpacing" title="4" name="1064419"><font color="#0000ff"><u>lefiSpacing</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038259" title="4" name="1064424"><font color="#0000ff"><u>Site Classes</u></font></a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiSite" title="4" name="1064429"><font color="#0000ff"><u>lefiSite</u></font></a><br><a href="#lefiSitePattern" title="4"><font color="#0000ff"><u>lefiSitePattern</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1057340" title="4" name="1064437"><font color="#0000ff"><u>Units Class</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038312" title="4" name="1064442"><font color="#0000ff"><u>lefiUnits</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1050128" title="4" name="1064447"><font color="#0000ff"><u>Use Min Spacing Class</u></font></a></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#lefiUseMinSpacing" title="4" name="1064452"><font color="#0000ff"><u>lefiUseMinSpacing</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038345" title="4" name="1064457"><font color="#0000ff"><u>Via Classes</u></font></a><font color="#000000"><strong> </strong></font></p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a href="#1038372" title="4" name="1064462"><font color="#0000ff"><u>lefiVia</u></font></a><br><a href="#lefiViaLayer" title="4"><font color="#0000ff"><u>lefiViaLayer</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a href="#1038580" title="4" name="1064470"><font color="#0000ff"><u>Via Rule Classes</u></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a href="#lefiViaRule" title="4" name="1064475"><font color="#0000ff"><u>lefiViaRule</u></font></a><br><a href="#lefiViaRuleLayer" title="4"><font color="#0000ff"><u>lefiViaRuleLayer</u></font></a></p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h2><a name="1064481">Layer Classes</a></h2>
|
|||
|
<p><a name="1064069">The LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> routines include the following classes:</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="#lefiAntennaModel" title="4" name="1064073"><font color="Blue"><u>lefiAntennaModel</u></font></a><a href="#lefiAntennaModel" title="4"> </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="#lefiAntennaPWL" title="4" name="1057924"><font color="Blue"><u>lefiAntennaPWL</u></font></a><a href="#lefiAntennaPWL" title="4"> </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="#lefiInfluence" title="4" name="1057529"><font color="Blue"><u>lefiInfluence</u></font></a><a href="#lefiInfluence" title="4"> </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="#lefiLayer" title="4" name="1050082"><font color="Blue"><u>lefiLayer</u></font></a><a href="#lefiLayer" title="4"> </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="#lefiLayerDensity" title="4" name="1037187"><font color="Blue"><u>lefiLayerDensity</u></font></a><a href="#lefiLayerDensity" title="4"> </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="#lefiOrthogonal" title="4" name="1058773"><font color="Blue"><u>lefiOrthogonal</u></font></a><a href="#lefiOrthogonal" title="4"> </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="#lefiParallel" title="4" name="1057534"><font color="Blue"><u>lefiParallel</u></font></a><a href="#lefiParallel" title="4"> </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="#lefiSpacingTable" title="4" name="1057539"><font color="Blue"><u>lefiSpacingTable</u></font></a><a href="#lefiSpacingTable" title="4"> </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="#lefiTwoWidths" title="4" name="1058814"><font color="Blue"><u>lefiTwoWidths</u></font></a><a href="#lefiTwoWidths" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiAntennaModel"></a><a name="1057553">lefiAntennaModel</a></h3>
|
|||
|
<p><a name="1057554">Retrieves antenna model information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> section of the LEF file.</p>
|
|||
|
<p><a name="1057559">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> sections, see <a href="../lefdefref/LEFSyntax.html#Layer(Cut)" target="external_window"><font color="#0000ff"><u>"Layer (Cut),"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057563">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058562">class lefiAntennaModel {<dd>int hasAntennaAreaRatio() const;<dd>int hasAntennaDiffAreaRatio() const; <dd>int hasAntennaDiffAreaRatioPWL() const;<dd>int hasAntennaCumAreaRatio() const;<dd>int hasAntennaCumDiffAreaRatio() const<dd>int hasAntennaCumDiffAreaRatioPWL() const;<dd>int hasAntennaAreaFactor() const;<dd>int hasAntennaAreaFactorDUO() const;<dd>int hasAntennaSideAreaRatio() const;<dd>int hasAntennaDiffSideAreaRatio() const;<dd>int hasAntennaDiffSideAreaRatioPWL() const;<dd>int hasAntennaCumSideAreaRatio() const;<dd>int hasAntennaCumDiffSideAreaRatio() const;<dd>int hasAntennaCumDiffSideAreaRatioPWL() const;<dd>int hasAntennaSideAreaFactor() const;<dd>int hasAntennaSideAreaFactorDUO() const;<dd>int hasAntennaCumRoutingPlusCut() const;<dd>int hasAntennaGatePlusDiff() const;<dd>int hasAntennaAreaMinusDiff() const;<dd>int hasAntennaAreaDiffReducePWL() const; <dd><dd>char* antennaOxide() const;<dd>double antennaAreaRatio() const;<dd>double antennaDiffAreaRatio() const;<dd></a><font color="#0000ff"><u>lefiAntennaPWL</u></font>* antennaDiffAreaRatioPWL() const;<dd>double antennaCumAreaRatio() const;<dd>double antennaCumDiffAreaRatio() const;<dd>lefiAntennaPWL* antennaCumDiffAreaRatioPWL() const;<dd>double antennaAreaFactor() const;<dd>double antennaSideAreaRatio() const;<dd>double antennaDiffSideAreaRatio() const;<dd>lefiAntennaPWL* antennaDiffSideAreaRatioPWL() const;<dd>double antennaCumSideAreaRatio() const;<dd>double antennaCumDiffSideAreaRatio() const;<dd>lefiAntennaPWL* antennaCumDiffSideAreaRatioPWL() const;<dd>double antennaSideAreaFactor() const; <dd>double antennaGatePlusDiff() const;<dd>double antennaAreaMinusDiff() const;<dd>lefiAntennaPWL* antennaAreaDiffReducePWL() const; };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiAntennaPWL"></a><a name="1050083">lefiAntennaPWL</a></h3>
|
|||
|
<p><a name="1050084">Retrieves antenna Piece-wise Linear Format (PWL) data from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> section of the LEF file. </p>
|
|||
|
<p><a name="1053188">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> sections, see <a href="../lefdefref/LEFSyntax.html#Layer(Cut)" target="external_window"><font color="#0000ff"><u>"Layer (Cut),"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1050199">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1050085">class lefiAntennaPWL {<dd>int numPWL() const;<dd>double PWLdiffusion(int index):<dd>double PWLratio(int index); };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiInfluence"></a><a name="1057481">lefiInfluence</a></h3>
|
|||
|
<p><a name="1057482">Retrieves influence rule information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section of the LEF file.</p>
|
|||
|
<p><a name="1057484">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section, see <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057485">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057486">class lefiInfluence {<dd>int numInfluenceEntry() const;<dd>double width(int index) const;<dd>double distance(int index) const;<dd>double spacing(int index) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiLayer"></a><a name="1037159">lefiLayer</a></h3>
|
|||
|
<p><a name="1032883">Retrieves data from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> section of the LEF file. This callback can be used for all layer types (cut, masterslice, implant, and routing). However, most of these functions apply to routing layers. Comments in the C++ syntax indicate those arguments that apply only to a particular layer type. All other arguments apply to all layer types.</p>
|
|||
|
<p><a name="1032885">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> sections, see <a href="../lefdefref/LEFSyntax.html#Layer(Cut)" target="external_window"><font color="#0000ff"><u>"Layer (Cut),"</u></font></a> <a href="../lefdefref/LEFSyntax.html#Layer(MastersliceorOverlap)" target="external_window"><font color="#0000ff"><u>"Layer (Masterslice or Overlap),"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1014190">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1060477">class lefiLayer {<dd>int hasType() const;<dd>int hasPitch() const; // Routing<dd>int hasXYPitch() const;<dd>int hasOffset() const; // Routing <dd>int hasXYOffset() const;<dd>int hasWidth() const; // Routing <dd>int hasArea() const;<dd>int hasDiagPitch() const;<dd>int hasXYDiagPitch() const;<dd>int hasDiagWidth() const;<dd>int hasDiagSpacing() const;<dd>int hasSpacingNumber() const; <dd>int hasSpacingName(int index) const;<dd>int hasSpacingLayerStack(int index) const;<dd>int hasSpacingAdjacent(int index) const;<dd>int hasSpacingCenterToCenter(int index) const;<dd>int hasSpacingRange(int index) const; // Routing <dd>int hasSpacingRangeUseLengthThreshold(int index) const;<dd>int hasSpacingRangeInfluence(int index) const;<dd>int hasSpacingRangeInfluenceRange(int index) const;<dd>int hasSpacingRangeRange(int index) const;<dd>int hasSpacingLengthThreshold(int index) const; // Routing<dd>int hasSpacingLengthThresholdRange(int index) const; // Routing<dd>int hasSpacingParallelOverlap(int index) const;<dd>int hasSpacingArea(int index) const;<dd>int hasSpacingEndOfLine(int index) const;<dd>int hasSpacingParellelEdge(int index) const;<dd>int hasSpacingTwoEdges(int index) const;<dd>int hasSpacingAdjacentExcept(int index) const;<dd>int hasSpacingSamenet(int index) const;<dd>int hasSpacingSamenetPGonly(int index) const;<dd>int hasSpacingNotchLength(int index) const;<br>int hasSpacingEndOfNotchWidth(int index) const;<br>int hasDirection() const; // Routing <br>int hasResistance() const; // Routing <br>int hasResistanceArray() const;<br>int hasCapacitance() const; // Routing <br>int hasCapacitanceArray() const;<br>int hasHeight() const; // Routing <br>int hasThickness() const; // Routing <br>int hasWireExtension() const; // Routing <br>int hasShrinkage() const; // Routing <br>int hasCapMultiplier() const; // Routing <br>int hasEdgeCap() const; // Routing <br>int hasAntennaLength() const; // Routing <br>int hasAntennaArea() const; // Routing <br>int hasCurrentDensityPoint() const; <br>int hasCurrentDensityArray() const;<br>int hasAc
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiLayerDensity"></a><a name="1058979">lefiLayerDensity</a></h3>
|
|||
|
<p><a name="1037340">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">LAYERDENSITY</font> statement in a <font size="2" face="'Courier New'" color="#000000">LAYER</font> section of the LEF file.</p>
|
|||
|
<p><a name="1053204">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> sections, see <a href="../lefdefref/LEFSyntax.html#Layer(Cut)" target="external_window"><font color="#0000ff"><u>"Layer (Cut),"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1037341">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058283">class lefiLayerDensity {<dd> char* type();<dd> int hasOneEntry();<dd> double oneEntry();<dd> int numFrequency();<dd> double frequency(int index);<dd> int numWidths();<dd> double width(int index);<dd> int numTableEntries();<dd> double tableEntry(int index);<dd> int numCutareas();<dd> double cutArea(int index); };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiOrthogonal"></a><a name="1058774">lefiOrthogonal</a></h3>
|
|||
|
<p><a name="1058775">Retrieves orthogonal spacing information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> section of the LEF file.</p>
|
|||
|
<p><a name="1058880">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> sections, see <a href="../lefdefref/LEFSyntax.html#Layer(Cut)" target="external_window"><font color="#0000ff"><u>"Layer (Cut)</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1058783">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058781">class lefiOrthogonal {<dd>int numOrthogonal() const;<dd>double cutWithin(int index) const;<dd>double orthoSpacing(int index) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiParallel"></a><a name="1057495">lefiParallel</a></h3>
|
|||
|
<p><a name="1057496">Retrieves parallel run length information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section of the LEF file. </p>
|
|||
|
<p><a name="1057498">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section, see <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057499">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057500">class lefiParallel {<dd>int numLength() const;<dd>int numWidth() const;<dd>double length(int iLength) const;<dd>double width(int iWidth) const;<dd>double widthSpacing(int iWidth, int iWidthSpacing) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiSpacingTable"></a><a name="1057501">lefiSpacingTable</a></h3>
|
|||
|
<p><a name="1057502">Retrieves spacing table information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section of the LEF file. </p>
|
|||
|
<p><a name="1057504">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section, see <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057505">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057524">class lefiSpacingTable {<dd>int isInfluence() const;<dd></a><font color="#0000ff"><u>lefiInfluence</u></font>* influence() const;<dd>int isParallel() const;<dd><font color="#0000ff"><u>lefiParallel</u></font>* parallel() const; <dd><a href="#lefiTwoWidths" title="4"><font color="#0000ff"><u>lefiTwoWidths</u></font></a>* twoWidths() const; };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiTwoWidths"></a><a name="1058853">lefiTwoWidths</a></h3>
|
|||
|
<p><a name="1058854">Retrieves two-width spacing information from a </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section of the LEF file.</p>
|
|||
|
<p><a name="1058898">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> (Routing) section, see <a href="../lefdefref/LEFSyntax.html#Layer(Routing)" target="external_window"><font color="#0000ff"><u>"Layer (Routing)"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1058856">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058851">class lefiTwoWidths {<dd>int numWidth() const;<dd>double width(int iWidth) const;<dd>int hasWidthPRL(int iWidth) const;<dd>double widthPRL(int iWidth) const;<dd>int numWidthSpacing(int iWidth) const;<dd>double widthSpacing(int iWidth, int iWidthSpacing) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1037350">Macro Data Classes</a></h2>
|
|||
|
<p><a name="1037351">The LEF </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> data routines include the following LEF classes:</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="#lefiDensity" title="4" name="1037355"><font color="Blue"><u>lefiDensity</u></font></a><a href="#lefiDensity" title="4"> </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="#lefiMacro" title="4" name="1058152"><font color="Blue"><u>lefiMacro</u></font></a><a href="#lefiMacro" title="4"> </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="#1062978" title="4" name="1063067"><font color="Blue"><u>lefiMacroForeign</u></font></a><a href="#1062978" title="4"> </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="#1063114" title="4" name="1063089"><font color="Blue"><u>lefiMacroSite</u></font></a><a href="#1063114" title="4"> </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="#1057954" title="4" name="1057953"><font color="Blue"><u>lefiPoints</u></font></a><a href="#1057954" title="4"></a> </td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiDensity"></a><a name="1058137">lefiDensity</a></h3>
|
|||
|
<p><a name="1058138">Retrieves density information from the </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> section of the LEF file.</p>
|
|||
|
<p><a name="1058171">For syntax information about the </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> section, see <a href="../lefdefref/LEFSyntax.html#Macro" target="external_window"><font color="#0000ff"><u>"Macro"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1058141">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058142">class lefiDensity {<dd>int numLayer() const;<dd>char* layerName(int index) const;<dd>int numRects(int index) const;<dd>struct lefiGeomRect getRect(int index, int rectIndex) const;<dd>double densityValue(int index, int rectIndex) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiMacro"></a><a name="1037347">lefiMacro</a></h3>
|
|||
|
<p><a name="1032910">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> section of the LEF file. </p>
|
|||
|
<p><a name="1032914">For syntax information about the </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> section, see <a href="../lefdefref/LEFSyntax.html#Macro" target="external_window"><font color="#0000ff"><u>"Macro"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1014212">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1014213">class lefiMacro {<dd>int hasClass() const;<dd>int hasGenerator() const;<dd>int hasGenerate() const;<dd>int hasPower() const;<dd>int hasOrigin() const;<dd>int hasEEQ() const;<dd>int hasLEQ() const;<dd>int hasSource() const;<dd>int hasXSymmetry() const;<dd>int hasYSymmetry() const;<dd>int has90Symmetry() const;<dd>int hasSiteName() const;<dd>int hasSitePattern() const;<dd>int hasSize() const;<dd>int hasForeign() const;<dd>int hasForeignOrigin(int index = 0) const;<dd>int hasForeignOrient(int index = 0) const;<dd>int hasForeignPoint(int index = 0) const;<dd>int hasClockType() const;<dd>int isBuffer() const;<dd>int isInverter() const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1014214"> int numSitePattern() const;<dd>int numProperties() const;<dd>const char* propName(int index) const;<dd>const char* propValue(int index) const;<dd>double propNum(int index) const;<dd>const char propType(int index) const;<dd>int propIsNumber(int index) const;<dd>int propIsString(int index) const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1014215"> const char* name() const;<dd>const char* macroClass() const;<dd>const char* generator() const;<dd>const char* EEQ() const;<dd>const char* LEQ() const;<dd>const char* source() const;<dd>const char* clockType() const;<dd>double originX() const;<dd>double originY() const;<dd>double power() const;<dd>void generate(char** name1, char** name2) const;<dd>lefiSitePattern* sitePattern(int index) const;<dd>const char* siteName() const;<dd>double sizeX() const;<dd>double sizeY() const;<dd>int numForeigns() const;<dd>int foreignOrient(int index = 0) const; //optional - for information, see<dd> //</a><a href="ch1Intro.html#1019049" title="1"><font color="DodgerBlue"><u>Orientation Codes</u></font></a><a href="ch1Intro.html#1019049" title="1"> </a> <dd>const char* foreignOrientStr(int index = 0) const;<dd>double foreignX(int index = 0) const;<dd>double foreignY(int index = 0) const;<dd>const char* foreignName(int index = 0) const; };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1062978">lefiMacroForeign</a></h3>
|
|||
|
<p><a name="1062979">Retrieves data for in-place processing of a </a><font size="2" face="'Courier New'" color="#000000">MACRO FOREIGN</font> statement. </p>
|
|||
|
<h4><a name="1062980">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1063241">class lefiMacroForeign {<dd>public:<dd> lefiMacroForeign(const char *name,<dd> int hasPts,<dd> double x,<dd> double y,<dd> int hasOrient,<dd> int orient);<dd><dd> const char *cellName() const;<dd> int cellHasPts() const;<dd> double px() const;<dd> double py() const;<dd> int cellHasOrient() const;<dd> int cellOrient() const;<dd><dd>protected:<dd> const char *cellName_;<dd> int cellHasPts_;<dd> double px_;<dd> double py_;<dd> int cellHasOrient_;<dd> int cellOrient_;<dd>};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1063114">lefiMacroSite</a></h3>
|
|||
|
<p><a name="1063115">Retrieves data for in-place processing of a </a><font size="2" face="'Courier New'" color="#000000">MACRO SITE</font> statement. </p>
|
|||
|
<h4><a name="1063116">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1063607">class lefiMacroSite {<dd>public:<dd> lefiMacroSite(const char *name, const lefiSitePattern* pattern);<dd><dd> const char *siteName() const;<dd> const lefiSitePattern *sitePattern() const;<dd><dd>protected:<dd> const char *siteName_;<dd> const lefiSitePattern *sitePattern_;<dd>};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1057954">lefiPoints</a></h3>
|
|||
|
<p><a name="1057955">Returns the X and Y points for the </a><font size="2" face="'Courier New'" color="#000000">ORIGIN</font> and <font size="2" face="'Courier New'" color="#000000">SIZE</font> statements in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section. </p>
|
|||
|
<h4><a name="1057960">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057961">struct lefiPoints {<dd>double x;<dd>double y; };</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057962">typedef struct lefiPoints lefiNum;</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1037366">Macro Examples</a></h3>
|
|||
|
<p><a name="1037367">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrMacroBeginCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">const char*</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037368">int macroBeginCB (lefrCallbackType_e type,<dd> const char *macroName,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037369"> // Incorrect type was passed in, expecting the type<dd>// lefiMacroBeginCbkType<dd> if (type != lefiMacroBeginCbkType) {<dd> printf("Type is not lefiMacroBeginCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037370"> // Expect a non null char* macroName<dd> if (!macroName || !*macroName) {<dd> printf("Macro name is null, terminate parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1053207"> // Write out the macro name<dd> printf("Macro name is %s\n", macroName);<dd> return 0;}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<p><a name="1037372">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrMacroCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiMacro</font>. This example only shows how to retrieve part of the data from the <font size="2" face="'Courier New'" color="#000000">lefiMacro</font> class.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037373">int macroCB (lefrCallbackType_e type,<dd> lefiMacro *macroInfo,<dd> lefiUserData userData) {<dd><dd> int propNum, i, hasPrtSym = 0;<dd> lefiSitePattern* pattern;<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037374"> // Check if the type is correct<dd> if (type != lefrMacroCbkType) {<dd> printf("Type is not lefrMacroCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd><dd> if (macroInfo->hasClass())<dd> printf(" CLASS %s\n", macroInfo->macroClass());<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037375"> if (macroInfo->hasXSymmetry()) {<dd> printf(" SYMMETRY X ");<dd> hasPrtSym = 1;<dd> }<dd> if (macroInfo->hasYSymmetry()) { // print X Y & R90 in one line<dd><dd> if (!hasPrtSym) { // the line has not started yet<dd> printf(" SYMMETRY Y ");<dd> hasPrtSym = 1;<dd> }<dd> else // the line has already started<dd> printf("Y ");<dd> }<dd> if (macroInfo->has90Symmetry()) {<dd> if (!hasPrtSym) { // the line has not started yet<dd> printf(" SYMMETRY R90 ");<dd> hasPrtSym = 1;<dd> }<dd> else // the line has already started<dd> printf("R90 ");<dd> }<dd> if (hasPrtSym) {<dd> printf ("\n");<dd> hasPrtSym = 0;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037376"> // Check if SITE pattern is defined in the macro<dd> if (macroInfo->hasSitePattern()) {<dd> for (i = 0; i < macroInfo->numSitePattern(); i++ ) {<dd> pattern = macroInfo->sitePattern(i);<dd> printf(" SITE %s %g %g %d DO %g BY %g STEP %g %g\n",<dd> pattern->name(), pattern->x(), pattern->y(),<dd> pattern->orient(), pattern->xStart(), <dd> pattern->yStart(),<dd> pattern->xStep(), pattern->yStep());<dd> }<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037377"> // Check if PROPERTY is defined in the macro<dd> propNum = macroInfo->numProperties();<dd> if (propNum > 0) {<dd> printf(" PROPERTY ");<dd> for (i = 0; i < propNum; i++) {<dd> // value can either be a string or number<dd> if (macroInfo->propValue(i)) {<dd> printf("%s %s ", macroInfo->propName(i),<dd> macroInfo->propValue(i));<dd> }<dd> else<dd> printf("%s %g ", macroInfo->propName(i),<dd> macroInfo->propNum(i));<dd> }<dd> printf("\n");<dd><dd> }<dd> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1063842">Macro Obstruction Class</a></h2>
|
|||
|
<p><a name="1063843">The LEF Macro Obstruction routines include the following LEF class:</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="#1014271" title="4" name="1063847"><font color="Blue"><u>lefiObstruction</u></font></a><a href="#1014271" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiMinFeature"></a><a name="lefiObstruction"></a><a name="1014271">lefiObstruction</a></h3>
|
|||
|
<p><a name="1033037">Retrieves data from the Macro Obstruction (</a><font size="2" face="'Courier New'" color="#000000">OBS</font>) statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section of the LEF file. The Macro Obstruction statement defines sets of obstructions (blockages) on the macro. </p>
|
|||
|
<p><a name="1033041">For syntax information about the Macro Obstruction statement, see </a><a href="../lefdefref/LEFSyntax.html#MacroObstructionStatement" target="external_window"><font color="#0000ff"><u>"Macro Obstruction Statement"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1014272">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1014273">class lefiObstruction {<dd></a><font color="#0000ff"><u>lefiGeometries</u></font>* geometries() const;};</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1037465">Macro Obstruction Examples</a></h3>
|
|||
|
<p><a name="1037466">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrObstructionCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiObstruction</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1050756">int macroObsCB (lefrCallbackType_e type,<dd>lefiObstruction* obsInfo,<dd>lefiUserData userData) {<dd><dd>lefiGeometries* geometry;<dd>int numItems;<dd>int i, j;<dd>lefiGeomPath* path;<dd>lefiGeomPathIter* pathIter;<dd>lefiGeomRect* rect;<dd>lefiGeomRectIter* rectIter;<dd>lefiGeomPolygon* polygon;<dd>lefiGeomPolygonIter* polygonIter;<dd>lefiGeomVia* via;<dd>lefiGeomViaIter* viaIter;<dd><dd>// Check if the type is correct<dd> if (type != lefrObstructionCbkType) {<dd> printf("Type is not lefrObstructionCbkType, <dd> terminate parsing.\n");<dd> return 1;}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1063825"> printf("OBS\n");<dd> geometry = obs->geometries();<dd> numItems = geometry->numItems();<dd><dd> for (i = 0; i < numItems; i++) {<dd> switch (geometry->itemType(i)) {<dd> case lefiGeomClassE:<dd> printf(" CLASS %s\n", geometry->getClass(i));<dd> break;<dd> case lefiGeomLayerE:<dd> printf(" LAYER %s\n", geometry->getLayer(i));<dd> break;<dd> case lefiGeomWidthE:<dd> printf(" WIDTH %g\n", geometry->getWidth(i))<dd> break;<dd> case lefiGeomPathE:<dd> path = geometry->getPath(i);<dd> printf(" PATH");<dd> for (j = 0; j < path->numPoints; j++)<dd> printf(" ( %g %g )", path->x[j], path->y[j]);<dd> printf("\n");<dd> break;<dd> case lefiGeomPathIterE:<dd> pathIter = geometry->getPathIter(i);<dd> printf(" PATH ITERATED");<dd> for (j = 0; j < pathIter->numPoints; j++)<dd> printf(" ( %g %g )", pathIter->x[j], <dd> pathIter ->y[j]);<dd> printf("\n");<dd> printf(" DO %g BY %g STEP %g %g\n", <dd> pathIter->xStart, pathIter->yStart, <dd> pathIter->xStep, pathIter->yStep);<dd> break;<dd> case lefiGeomRectE:<dd> rect = geometry->getRect(i);<dd> printf(" RECT ( %g %g ) ( %g %g )\n", rect->xl,<dd> rect->yl, rect->xh, rect->yh);<dd> break;<br> case lefiGeomRectIterE:<br> rectIter = geometry->getRectIter(i);<br> printf(" RECT ITERATE ( %g %g ) ( %g %g )\n",<br> rectIter->xl, rectIter->yl, <br> rectIter->xh, rectIter->yh);<br> printf(" DO %g BY %g STEP %g %g\n", <br> rectIter->xStart, rectIter->yStart, <br> rectIter->xStep, rectIter->yStep);<br> break;<br> case lefiGeomPolygonE:<br> polygon = geometry->getPolygon(i);<br> printf(" POLYGON");<br> for (j = 0; j < polygon->numPoints; j++)<br> printf(" ( %g %g )", polygon->x[j], polygon-<br> >y[j]);<br> printf("\n");<br> break;<br> case lefiGeomPolygonIterE:<br> polygonIter = geometry->getPolygonIter(i);<br> printf(" POLYGON ITERATE");<br> for (j = 0; j < polygonIter->numPoints; j++)<br> printf(" ( %g %g )", polygonIter->x[j],<br> polygonIter->y[j]);<br> printf("\n");<br> printf(" DO %g BY %g STEP %g %g\n", <br> polygonIter->xStart, polygonIter->yStart,<br> polygonIter->xStep, polygonIter->yStep);<br> break;<br> case lefiGeomViaE:<br> via = geometry->getVia(i);<br> printf(" VIA ( %g %g ) %s\n", via->
|
|||
|
</dl>
|
|||
|
<h2><a name="MacroPinRoutines"></a><a name="1063828">Macro Pin Classes</a></h2>
|
|||
|
<p><a name="1063829">The LEF Macro Pin routines include the following LEF classes:</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="#lefiPin" title="4" name="1037486"><font color="Blue"><u>lefiPin</u></font></a><a href="#lefiPin" title="4"> </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="#lefiPinAntennaModel" title="4" name="1057639"><font color="Blue"><u>lefiPinAntennaModel</u></font></a><a href="#lefiPinAntennaModel" title="4"> </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="#lefiGeometries" title="4" name="1037490"><font color="Blue"><u>lefiGeometries</u></font></a><a href="#lefiGeometries" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiPin"></a><a name="1037463">lefiPin</a></h3>
|
|||
|
<p><a name="1037543">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">PIN</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section of the LEF file. <font size="2" face="'Courier New'" color="#000000">MACRO</font> <font size="2" face="'Courier New'" color="#000000">PIN</font> statements are included in the LEF file for each macro. </p>
|
|||
|
<p><a name="1039522">For syntax information about the Macro Pin statement, see </a><a href="../lefdefref/LEFSyntax.html#MacroPinStatement" target="external_window"><font color="#0000ff"><u>"Macro Pin Statement"</u></font></a> in the <br><font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1014280">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1050780">class lefiPin {<dd>int hasForeign() const;<dd>int hasForeignOrient(int index = 0) const;<dd>int hasForeignPoint(int index = 0) const;<dd>int hasLEQ() const;<dd>int hasDirection() const;<dd>int hasUse() const;<dd>int hasShape() const;<dd>int hasMustjoin() const;<dd>int hasOutMargin() const;<dd>int hasOutResistance() const;<dd>int hasInMargin() const;<dd>int hasPower() const;<dd>int hasLeakage() const;<dd>int hasMaxload() const;<dd>int hasMaxdelay() const;<dd>int hasCapacitance() const;<dd>int hasResistance() const;<dd>int hasPulldownres() const;<dd>int hasTieoffr() const;<dd>int hasVHI() const;<dd>int hasVLO() const;<dd>int hasRiseVoltage() const;<dd>int hasFallVoltage() const;<dd>int hasRiseThresh() const;<dd>int hasFallThresh() const;<dd>int hasRiseSatcur() const;<dd>int hasFallSatcur() const;<dd>int hasCurrentSource() const;<dd>int hasTables() const;<dd>int hasAntennaSize() const;<dd>int hasAntennaMetalArea() const;<dd>int hasAntennaMetalLength() const;<dd>int hasAntennaPartialMetalArea() const;<dd>int hasAntennaPartialMetalSideArea() const;<dd>int hasAntennaPartialCutArea() const;<dd>int hasAntennaDiffArea() const;<dd>int hasAntennaModel() const;<dd>int hasTaperRule() const;<dd>int hasRiseSlewLimit() const;<dd>int hasFallSlewLimit() const;<dd>int hasNetExpr() const;<dd>int hasSupplySensitivity() const;<dd>int hasGroundSensitivity() const;<dd><dd>const char* name() const;<dd><dd>int numPorts() const;<dd></a><font color="#0000ff"><u>lefiGeometries</u></font>* port(int index) const;<dd><dd>int numForeigns() const;<dd>const char* foreignName(int index = 0) const;<dd>const char* taperRule() const;<dd>int foreignOrient(int index = 0) const; // optional - for information, see<dd> // <a href="ch1Intro.html#1019049" title="1"><font color="DodgerBlue"><u>Orientation Codes</u></font></a><a href="ch1Intro.html#1019049" title="1"> </a><dd>const char* foreignOrientStr(int index = 0) const;<br>double foreignX(int index = 0) const;<br>double foreignY(int index = 0) const;<br>const char* LEQ() const;<br>const char* direction() const;<br>const char* use() const;<br>const char* shape() const;<br>const char* mustjoin() const;<br>double outMarginHigh() const;<br>double outMarginLow() const;<br>double outResistanceHigh() const;<br>double outResistanceLow() const;<br>double inMarginHigh() const;<br>double inMarginLow() const;<br>double power() const;<br>double leakage() const;<br>double maxload() const;<br>double maxdelay() const;<br>double capacitance() const;<br>double resistance() const;<br>double pulldownres() const;<br>double tieoffr() const;<br>double VHI() const;<br>double VLO() const;<br>double riseVoltage() const;<br>double fallVoltage() const;<br>double riseThresh() const;<br>double fallThresh() const;<br>double riseSatcur() const;<br>double fallSatcur() const;<br>double riseSlewLimit() const;<br>double fallSlewLimit() const;<br>const char* currentSource() const;<br>const char* tableHighName() const;<br>const char* tableLowName() const;<br><br>int numAntennaSize() const;<br>double antennaSize(int index) const;<br>const char* antennaSizeLayer(int index) const;<br><br>int numAntennaMetalArea() const;<br>double antennaMetalArea(int index) const;<br>const char* antennaMetalAreaLayer(int index) const;<br><br>int numAntennaMetalLength() const;<br>double antennaMetalLength(int index) const;<br>const char* antennaMetalLengthLayer(int index) const;<br><br>int numAntennaPartialMetalArea() const;<br>double antennaPartialMetalArea(int index) const;<br>const char* antennaPartialMetalAreaLayer(int index) const;<br><br>int numAntennaPartialMetalSideArea() const;<br>double antennaPartialMetalSideArea(int index) const;<br>const char* antennaPartialMetalSideAreaLayer(int index) const;<br><br>int numAntennaPartialCutArea() const;<br>double antennaPartialCu
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiPinAntennaModel"></a><a name="1057604">lefiPinAntennaModel</a></h3>
|
|||
|
<p><a name="1057605">Retrieves antenna model information from Macro Pin statement of the LEF file.</a></p>
|
|||
|
<p><a name="1057614">For syntax information about the Macro Pin statement, see </a><a href="../lefdefref/LEFSyntax.html#MacroPinStatement" target="external_window"><font color="#0000ff"><u>"Macro Pin Statement"</u></font></a> in the <br><font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057636">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057611">class lefiAntennaModel {<dd>int hasAntennaGateArea() const;<dd>int hasAntennaMaxAreaCar() cons<dd>int hasAntennaMaxSideAreaCar() const;<dd>int hasAntennaMaxCutCar() const;<dd><dd>char* antennaOxide() const;<dd><dd>int numantennaGateArea() const;<dd>double antennaGateArea(int index) const;<dd>const char* antennaGateAreaLayer(int index) const;<dd><dd>int numAntennaMaxAreaCar() const;<dd>double antennaMaxAreaCar(int index) const;<dd>const char* antennaMaxAreaCarLayer(int index) const;<dd><dd>int numAntennaMaxSideAreaCar() conts;<dd>double antennaMaxSideAreaCar(int index) const;<dd>const char* antennaMaxSideAreaCarLayer(int index) const;<dd><dd>int numAntennaMaxCutCar() const;<dd>double antennaMaxCutCar(int index) const;<dd>const char* antennaMaxCutCarLayer(int index) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeometries"></a><a name="1037568">lefiGeometries</a></h3>
|
|||
|
<p><a name="1037569">Retrieves data from the Macro Pin statement and from the Macro Obstruction statement in the </a><font size="2" face="'Courier New'" color="#000000">MACRO</font> section of the LEF file. These statements specify the pin port and obstruction geometries for the macro.</p>
|
|||
|
<p><a name="1037572">For syntax information about LEF geometries, see </a><a href="../lefdefref/LEFSyntax.html#LayerGeometries" target="external_window"><font color="#0000ff"><u>"Layer Geometries"</u></font></a> in the<font color="#000000"><em> LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1037577">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1061377">class lefiGeometries {<dd>int numItems() const;<dd>enum lefiGeomEnum itemType(int index) const;<dd>struct </a><font color="#0000ff"><u>lefiGeomRect</u></font>* getRect(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomRectIter</u></font>* getRectIter(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomPath</u></font>* getPath(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomPathIter</u></font>* getPathIter(int index) const;<dd>int hasLayerExceptPgNet(int index) const;<dd>char* getLayer(int index) const;<dd>double getLayerMinSpacing(int index) const;<dd>double getLayerRuleWidth(int index) const;<dd>double getWidth(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomPolygon</u></font>* getPolygon(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomPolygonIter</u></font>* getPolygonIter(int index) const;<dd>char* getClass(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomVia</u></font>* getVia(int index) const;<dd>struct <font color="#0000ff"><u>lefiGeomViaIter</u></font>* getViaIter(int index) const;<dd><dd>int colorMask;<dd>};</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomEnum"></a><a name="1037689">lefiGeomEnum</a></h3>
|
|||
|
<p><a name="1037690">Returns the type of geometry of a macro.</a></p>
|
|||
|
<h4><a name="1037691">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037692">enum lefiGeomEnum {<dd>lefiGeomunknown = 0,<dd>lefiGeomLayerE,<dd>lefiGeomLayerMinSpacingE,<dd>lefiGeomLayerRuleWidthE,<dd>lefiGeomWidthE,<dd>lefiGeomPathE,<dd>lefiGeomPathIterE,<dd>lefiGeomRectE,<dd>lefiGeomRectIterE,<dd>lefiGeomPolygonE,<dd>lefiGeomPolygonIterE,<dd>lefiGeomViaE,<dd>lefiGeomViaIterE,<dd>lefiGeomClassE,<dd>lefiGeomEnd };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomRect"></a><a name="1037694">lefiGeomRect</a></h3>
|
|||
|
<p><a name="1037695">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">RECT</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037696">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037697">struct lefiGeomRect {<dd>double </a><font color="#000000"><em>xl</em></font>;<dd>double <font color="#000000"><em>yl</em></font>;<dd>double <font color="#000000"><em>xh</em></font>;<dd>double <font color="#000000"><em>yh</em></font>; <dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>; }; //specify color mask number for the GeomRect<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomRectIter"></a><a name="1037705">lefiGeomRectIter</a></h3>
|
|||
|
<p><a name="1037706">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">RECT</font> <font size="2" face="'Courier New'" color="#000000">ITERATE</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037707">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037708">struct lefiGeomRectIter {<dd>double </a><font color="#000000"><em>xl</em></font>;<dd>double <font color="#000000"><em>yl</em></font>;<dd>double <font color="#000000"><em>xh</em></font>;<dd>double <font color="#000000"><em>yh</em></font>;<dd>double <font color="#000000"><em>xStart</em></font>;<dd>double <font color="#000000"><em>yStart</em></font>;<dd>double <font color="#000000"><em>xStep</em></font>;<dd>double <font color="#000000"><em>yStep</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>;}; //specify color mask number for the GeomRectIter<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<p><font color="#000000"><strong>Note: </strong></font><a name="1058395">For the following step pattern:</a></p>
|
|||
|
<blockquote>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"></font>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058401">DO </a><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font> BY <font size="2" face="'Courier New'" color="#000000"><em>numY</em></font> STEP <font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font> <font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font> </font>
|
|||
|
</blockquote>
|
|||
|
<p><a name="1058402">The values are mapped to the structure in the following way:</a></p>
|
|||
|
<p align="left"><a name="1058404"> </a></p>
|
|||
|
<table summary="" border="1" cellpadding="5" cellspacing="0" width="648">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="182">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058407">Step Pattern Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="466">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058409">Maps to Structure Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058411"><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058413"><font size="2" face="'Courier New'" color="#000000"><em>xStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058415"><font size="2" face="'Courier New'" color="#000000"><em>numY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058417"><font size="2" face="'Courier New'" color="#000000"><em>yStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058431"><font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058433"><font size="2" face="'Courier New'" color="#000000"><em>xStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058427"><font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058429"><font size="2" face="'Courier New'" color="#000000"><em>yStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h3><a name="lefiGeomPath"></a><a name="1037711">lefiGeomPath</a></h3>
|
|||
|
<p><a name="1037712">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">PATH</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037713">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037714">struct lefiGeomPath {<dd>int </a><font size="2" face="'Courier New'" color="#000000"><em>numPoints</em></font>;<dd>double* <font size="2" face="'Courier New'" color="#000000"><em>x</em></font>;<dd>double* <font size="2" face="'Courier New'" color="#000000"><em>y</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>; }; //specify color mask number for the GeomPath<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomPathIter"></a><a name="1037717">lefiGeomPathIter</a></h3>
|
|||
|
<p><a name="1037718">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">PATH</font> <font size="2" face="'Courier New'" color="#000000">ITERATE</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037719">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1060896">struct lefiGeomPathIter {<dd>int </a><font size="2" face="'Courier New'" color="#000000"><em>numPoints</em></font>;<dd>double* <font color="#000000"><em>x</em></font>;<dd>double* <font color="#000000"><em>y</em></font>;<dd>double <font color="#000000"><em>xStart</em></font>;<dd>double <font color="#000000"><em>yStart</em></font>;<dd>double <font color="#000000"><em>xStep</em></font>;<dd>double <font color="#000000"><em>yStep</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>; }; //specify color mask number for the GeomPathIter<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<p><font color="#000000"><strong>Note: </strong></font><a name="1058438">For the following step pattern:</a></p>
|
|||
|
<blockquote>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"></font>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058439">DO </a><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font> BY <font size="2" face="'Courier New'" color="#000000"><em>numY</em></font> STEP <font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font> <font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font> </font>
|
|||
|
</blockquote>
|
|||
|
<p><a name="1058440">The values are mapped to the structure in the following way:</a></p>
|
|||
|
<p align="left"><a name="1058462"> </a></p>
|
|||
|
<table summary="" border="1" cellpadding="5" cellspacing="0" width="648">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="182">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058443">Step Pattern Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="466">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058445">Maps to Structure Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058447"><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058449"><font size="2" face="'Courier New'" color="#000000"><em>xStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058451"><font size="2" face="'Courier New'" color="#000000"><em>numY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058453"><font size="2" face="'Courier New'" color="#000000"><em>yStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058455"><font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058457"><font size="2" face="'Courier New'" color="#000000"><em>xStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058459"><font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058461"><font size="2" face="'Courier New'" color="#000000"><em>yStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h3><a name="lefiGeomPolygon"></a><a name="1037728">lefiGeomPolygon</a></h3>
|
|||
|
<p><a name="1037729">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">POLYGON</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037730">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1062146">struct lefiGeomPolygon {<dd>int </a><font size="2" face="'Courier New'" color="#000000"><em>numPoints</em></font>;<dd>double* <font color="#000000"><em>x</em></font>;<dd>double* <font color="#000000"><em>y</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>; }; //specify color mask number for the GeomPolygon<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomPolygonIter"></a><a name="1037734">lefiGeomPolygonIter</a></h3>
|
|||
|
<p><a name="1037735">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">POLYGON</font> <font size="2" face="'Courier New'" color="#000000">ITERATE</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037736">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1061052">struct lefiGeomPolygonIter {<dd>int </a><font size="2" face="'Courier New'" color="#000000"><em>numPoints</em></font>;<dd>double* <font color="#000000"><em>x</em></font>;<dd>double* <font color="#000000"><em>y</em></font>;<dd>double <font color="#000000"><em>xStart</em></font>;<dd>double <font color="#000000"><em>yStart</em></font>;<dd>double <font color="#000000"><em>xStep</em></font>;<dd>double <font color="#000000"><em>yStep</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>colorMask</em></font>; }; //specify color mask number for the GeomPolygonIter<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<p><font color="#000000"><strong>Note: </strong></font><a name="1058473">For the following step pattern:</a></p>
|
|||
|
<blockquote>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"></font>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058474">DO </a><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font> BY <font size="2" face="'Courier New'" color="#000000"><em>numY</em></font> STEP <font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font> <font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font> </font>
|
|||
|
</blockquote>
|
|||
|
<p><a name="1058475">The values are mapped to the structure in the following way:</a></p>
|
|||
|
<p align="left"><a name="1058497"> </a></p>
|
|||
|
<table summary="" border="1" cellpadding="5" cellspacing="0" width="648">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="182">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058478">Step Pattern Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="466">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058480">Maps to Structure Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058482"><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058484"><font size="2" face="'Courier New'" color="#000000"><em>xStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058486"><font size="2" face="'Courier New'" color="#000000"><em>numY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058488"><font size="2" face="'Courier New'" color="#000000"><em>yStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058490"><font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058492"><font size="2" face="'Courier New'" color="#000000"><em>xStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058494"><font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058496"><font size="2" face="'Courier New'" color="#000000"><em>yStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h3><a name="lefiGeomVia"></a><a name="1037740">lefiGeomVia</a></h3>
|
|||
|
<p><a name="1037741">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">VIA</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037742">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1061119">struct lefiGeomVia {<dd>char* </a><font color="#000000"><em>name</em></font>;<dd>double <font color="#000000"><em>x</em></font>;<dd>double <font color="#000000"><em>y</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>topMaskNum</em></font>; //define top mask number for the GeomVia structure.<dd>int <font size="2" face="'Courier New'" color="#000000"><em>cutMaskNum</em></font>; //define cut mask number for the GeomVia structure.<dd>int <font size="2" face="'Courier New'" color="#000000"><em>bottomMaskNum</em></font>;}; //define bottom mask number for the GeomVia structure.</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiGeomViaIter"></a><a name="1037746">lefiGeomViaIter</a></h3>
|
|||
|
<p><a name="1037747">Returns data from the </a><font size="2" face="'Courier New'" color="#000000">VIA</font> <font size="2" face="'Courier New'" color="#000000">ITERATE</font> statement in the <font size="2" face="'Courier New'" color="#000000">MACRO</font> section.</p>
|
|||
|
<h4><a name="1037748">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1061337">struct lefiGeomViaIter {<dd>char* </a><font color="#000000"><em>name</em></font>;<dd>double <font color="#000000"><em>x</em></font>;<dd>double <font color="#000000"><em>y</em></font>;<dd>double <font color="#000000"><em>xStart</em></font>;<dd>double <font color="#000000"><em>yStart</em></font>;<dd>double <font color="#000000"><em>xStep</em></font>;<dd>double <font color="#000000"><em>yStep</em></font>;<dd>int <font size="2" face="'Courier New'" color="#000000"><em>topMaskNum</em></font>; //define top mask number for the GeomViaIter structure.<dd>int <font size="2" face="'Courier New'" color="#000000"><em>cutMaskNum</em></font>; //define cut mask number for the GeomViaIter structure.<dd>int <font size="2" face="'Courier New'" color="#000000"><em>bottomMaskNum</em></font>;}; //define bottom mask number for the GeomViaIter<dd> //structure.</font>
|
|||
|
</dl>
|
|||
|
<p><font color="#000000"><strong>Note: </strong></font><a name="1061338">For the following step pattern:</a></p>
|
|||
|
<blockquote>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"></font>
|
|||
|
<font size="2" face=""Courier New"" color="#000000"><a name="1058505">DO </a><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font> BY <font size="2" face="'Courier New'" color="#000000"><em>numY</em></font> STEP <font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font> <font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font> </font>
|
|||
|
</blockquote>
|
|||
|
<p><a name="1058506">The values are mapped to the structure in the following way:</a></p>
|
|||
|
<p align="left"><a name="1058528"> </a></p>
|
|||
|
<table summary="" border="1" cellpadding="5" cellspacing="0" width="648">
|
|||
|
<caption>
|
|||
|
<tr>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="182">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058509">Step Pattern Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
<td bgcolor="#CCCCCC" cellpadding="4" border="2" bordercolor="#000000" valign="middle" width="466">
|
|||
|
<p>
|
|||
|
<font face="Verdana, Arial, Helvetica, sans-serif" color="#003366"><strong><a name="1058511">Maps to Structure Value</a></strong></font>
|
|||
|
</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058513"><font size="2" face="'Courier New'" color="#000000"><em>numX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058515"><font size="2" face="'Courier New'" color="#000000"><em>xStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058517"><font size="2" face="'Courier New'" color="#000000"><em>numY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058519"><font size="2" face="'Courier New'" color="#000000"><em>yStart</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058521"><font size="2" face="'Courier New'" color="#000000"><em>spaceX</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" valign="top">
|
|||
|
<p><a name="1058523"><font size="2" face="'Courier New'" color="#000000"><em>xStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058525"><font size="2" face="'Courier New'" color="#000000"><em>spaceY</em></font></a> </p>
|
|||
|
</td>
|
|||
|
<td cellpadding="4" border="1" bordercolor="#000000" valign="top">
|
|||
|
<p><a name="1058527"><font size="2" face="'Courier New'" color="#000000"><em>yStep</em></font></a> </p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
<h3><a name="1037795">Macro Pin Examples</a></h3>
|
|||
|
<p><a name="1037796">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrPinCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiPin</font>. This example only shows how to retrieve part of the data from the <font size="2" face="'Courier New'" color="#000000">lefiPin</font> class.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037797">int macroPinCB (lefrCallbackType_e type,<dd> lefiPin* pinInfo,<dd> lefiUserData userData) {<dd><dd> lefiGeometries* geometry;<dd> int numPorts;<dd> int numItems;<dd> int i, j;<dd> lefiGeomPath* path;<dd> lefiGeomPathIter* pathIter;<dd> lefiGeomRect* rect;<dd> lefiGeomRectIter* rectIter;<dd> lefiGeomPolygon* polygon;<dd> lefiGeomPolygonIter* polygonIter;<dd> lefiGeomVia* via;<dd> lefiGeomViaIter* viaIter;<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037799"> // Check if the type is correct<dd> if (type != lefrPinCbkType) {<dd> printf("Type is not lefrPinCbkType, terminate parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037800"> printf("PIN %s\n", pin->name());<dd><dd> if (pin->hasForeign()) {<dd> if (pin->hasForeignOrient())<dd> printf(" FOREIGN %s STRUCTURE ( %g %g ) %d\n", <dd> pin->foreignName(), pin->foreignX(), <dd> pin->foreignY(), pin->foreignOrient());<dd> else if (pin->hasForeignPoint())<dd> printf(" FOREIGN %s STRUCTURE ( %g %g )\n",<dd> pin->foreignName(), pin->foreignX(), <dd> pin->foreignY());<dd> else<dd> printf(" FOREIGN %s\n", pin->foreignName());<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037801"> if (pin->hasLEQ())<dd> printf(" LEQ %s\n", pin->LEQ());<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037802"> if (pin->hasAntennaSize()) {<dd> for (i = 0; i < pin->numAntennaSize(); i++) {<dd> printf(" ANTENNASIZE %g ", pin->antennaSize(i));<dd> if (pin->antennaSizeLayer(i))<dd> printf("LAYER %s ", pin->antennaSizeLayer(i));<dd> printf("\n");<dd> }<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1037803"> numPorts = pin->numPorts();<dd> for (i = 0; i < numPorts; i++) {<dd> printf(" PORT\n");<dd> geometry = pin->port(i);<dd> // A complete example can be found .<dd> numItems = geometry->numItems();<dd> for (j = 0; j < numItems; j++) {<dd> switch (geometry->itemType(j)) {<dd> case lefiGeomClassE:<dd> printf(" CLASS %s\n", geometry->getClass(j));<dd> break;<dd> case lefiGeomLayerE:<dd> printf(" LAYER %s\n", geometry->getLayer(j));<dd> break;<dd> case lefiGeomWidthE:<dd> printf(" WIDTH %g\n", geometry->getWidth(j));<dd> break;<dd> case lefiGeomPathE:<dd> ...<dd> break;<dd> case lefiGeomPathIterE:<dd> ...<dd> break;<dd> case lefiGeomRectE:<dd> rect = geometry->getRect(j);<dd> printf(" RECT ( %g %g ) ( %g %g )\n", rect->xl,<dd> rect->yl, rect->xh, rect->yh);<dd> break;<dd> case lefiGeomRectIterE:<dd> ...<dd> break;<dd> case lefiGeomPolygonE:<dd> ...<dd> break;<dd> case lefiGeomPolygonIterE:<dd> ...<dd> break;<dd> case lefiGeomViaE:<dd> ...<dd> break;<dd> case lefiGeomViaIterE:<dd> ...<dd> break;<dd> }<dd> }<dd> }<dd> return 0; }</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1037937">Maximum Via Stack Class</a></h2>
|
|||
|
<p><a name="1057818">The LEF </a><font size="2" face="'Courier New'" color="#000000">MAXSTACKVIA</font> routines include the following LEF class:</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="1057823"> </a><a href="#lefiMaxStackVia" title="4"><font color="Blue"><u>lefiMaxStackVia</u></font></a><a href="#lefiMaxStackVia" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiMaxStackVia"></a><a name="1057808">lefiMaxStackVia</a></h3>
|
|||
|
<p><a name="1057809">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">MAXVIASTACK</font> statement in the LEF file. </p>
|
|||
|
<p><a name="1057811">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">MAXVIASTACK</font> statement, see <a href="../lefdefref/LEFSyntax.html#MaximumViaStack" target="external_window"><font color="#0000ff"><u>"Maximum Via Stack"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057812">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057813">class lefiMaxStackVia {<dd>int maxStackVia() const;<dd>int hasMaxStackViaRange() const;<dd>const char* maxStackViaBottomLayer() const;<dd>const char* maxStackViaTopLayer() const; }</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1057802">Miscellaneous Class</a></h2>
|
|||
|
<p><a name="1037938">Miscellaneous routines include the following LEF class:</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="#lefiUserData" title="4" name="1057749"><font color="Blue"><u>lefiUserData</u></font></a><a href="#lefiUserData" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiUserData"></a><a name="1037967">lefiUserData</a></h3>
|
|||
|
<p><a name="1057669">The user data can be set or changed at any time with the </a><font size="2" face="'Courier New'" color="#000000">lefrSetUserData</font> and <font size="2" face="'Courier New'" color="#000000">lefrGetUserData</font> calls. Every callback returns the user data as the third argument.</p>
|
|||
|
<h4><a name="1057670">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057671">lefiUserData lefrGetUserData()</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038008">Nondefault Rule Class</a></h2>
|
|||
|
<p><a name="lefiNonDefault"></a><a name="1038015">The LEF </a><font size="2" face="'Courier New'" color="#000000">NONDEFAULT</font> <font size="2" face="'Courier New'" color="#000000">RULE</font> routines include the following LEF class:</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="#lefiNonDefault" title="4" name="1038019"><font color="Blue"><u>lefiNonDefault</u></font></a><a href="#lefiNonDefault" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiNonDefault"></a><a name="1038047">lefiNonDefault </a></h3>
|
|||
|
<p><a name="1038048">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">NONDEFAULTRULE</font> statement in the LEF file.</p>
|
|||
|
<p><a name="1038051">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">NONDEFAULTRULE</font> statement, see <a href="../lefdefref/LEFSyntax.html#NondefaultRule" target="external_window"><font color="#0000ff"><u>"Nondefault Rule"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038053">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038054">class lefiNonDefault {<dd>const char* name() const;<dd>int hardSpacing() const;<dd>int numProps() const;<dd>const char* propName(int index) const;<dd>const char* propValue(int index) const;<dd>double propNumber(int index) const;<dd>const char propType(int index) const; <dd>int propIsNumber(int index) const;<dd>int propIsString(int index) const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058114"> int numLayers() const;<dd>const char* layerName(int index) const;<dd>int hasLayerWidth(int index) const;<dd>double layerWidth(int index) const;<dd>int hasLayerSpacing(int index) const;<dd>double layerSpacing(int index) const;<dd>int hasLayerWireExtension(int index) const;<dd>double layerWireExtension(int index) const;<dd>int hasLayerDiagWidth(int index) const;<dd>double layerDiagWidth(int index) const;<dd><dd>int numVias() const;<dd></a><font color="#0000ff"><u>lefiVia</u></font>* viaRule(int index) const;</font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038058"> int numSpacingRules() const;<dd></a><font color="#0000ff"><u>lefiSpacing</u></font>* spacingRule(int index) const;<dd><dd>int numUseVia() const;<dd>const char* viaName(int index) const;<dd>int numUseViaRule() const;<dd>const char* viaRuleName(int index) const;<dd>int numMinCuts() const;<dd>const char* cutLayerName(int index) const;<dd>int numCuts(int index) const; };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038111">Nondefault Rule Examples</a></h3>
|
|||
|
<p><a name="1038112">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrNonDefaultCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiNonDefault</font>. This example only shows how to retrieve part of the data from the <font size="2" face="'Courier New'" color="#000000">lefiNonDefault</font> class. For examples of how to retrieve via and spacing data, see the Via Routines and Same-Net Spacing Routines sections. </p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038113">int nonDefaultCB (lefrCallbackType_e type,<dd> lefiNonDefault* nonDefInfo,<dd> lefiUserData userData) {<dd> int i;<dd> lefiVia* via;<dd> lefiSpacing* spacing;<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038114"> // Check if the type is correct<dd> if (type != lefrNonDefaultCbkType) {<dd> printf("Type is not lefrNonDefaultCbkType, terminate<dd> parsing.\n");<dd> return 1; }<dd><dd>// Print out nondefaultrule data<dd> printf("NONDEFAULTRULE %s\n", def->name());<dd> for (i = 0; i < def->numLayers(); i++) {<dd> printf(" LAYER %s\n", def->layerName(i));<dd> if (def->hasLayerWidth(i))<dd> printf(" WIDTH %g\n", def->layerWidth(i));<dd> if (def->hasLayerSpacing(i))<dd> printf(" SPACING %g\n", def->layerSpacing(i));}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038115"> // handle via in nondefaultrule<dd> for (i = 0; i < def->numVias(); i++) {<dd> via = def->viaRule(i);<dd><dd> // handle spacing in nondefaultrule<dd> for (i = 0; i < def->numSpacingRules(); i++) {<dd> spacing = def->spacingRule(i);}<dd><dd> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038123">Property Definition Classes</a></h2>
|
|||
|
<p><a name="lefiNonDefault"></a><a name="1038129">The LEF </a><font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONS</font> routines include the following classes:</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="#lefiProp" title="4" name="1038133"><font color="Blue"><u>lefiProp</u></font></a><a href="#lefiProp" title="4"> </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="#lefiPropType" title="4" name="1053120"><font color="Blue"><u>lefiPropType</u></font></a><a href="#lefiPropType" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiProp"></a><a name="1037566">lefiProp</a></h3>
|
|||
|
<p><a name="1033070">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONS</font> statement in the LEF file. The <font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONS</font> statement lists all properties used in the LEF file. You must define properties before you refer to them in other routines in the LEF file.</p>
|
|||
|
<p><a name="1038160">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONS</font> statement, see <font color="#0000ff"><u>"Property </u></font><a href="../lefdefref/LEFSyntax.html#PropertyDefinitions" target="external_window"><font color="#0000ff"><u>Definitions"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1018620">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1034481">class lefiProp {<dd>const char* string() const;<dd>const char* propType() const;<dd>const char* propName() const;<dd>char dataType() const;<dd>int hasNumber() const;<dd>int hasRange() const;<dd>int hasString() const;<dd>int hasNameMapString() const;<dd>double number() const;<dd>double left() const;<dd>double right() const;};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiPropType"></a><a name="1057835">lefiPropType</a></h3>
|
|||
|
<p><a name="1057836">Retrieves the data type from the LEF </a><font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONs</font> statement in the LEF file, if the property is of type <font size="2" face="'Courier New'" color="#000000">REAL</font> or <font size="2" face="'Courier New'" color="#000000">INTEGER</font>. </p>
|
|||
|
<p><a name="1057912">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">PROPERTYDEFINITIONS</font> statement, see <font color="#0000ff"><u>"Property </u></font><a href="../lefdefref/LEFSyntax.html#PropertyDefinitions" target="external_window"><font color="#0000ff"><u>Definitions"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1057837">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057838">class lefiPropType {<dd>const char propType(char* name) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1053125">Property Definition Examples</a></h3>
|
|||
|
<p><a name="1038166">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrPropBeginCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">void *</font>. This callback routine marks the beginning of the Property Definition section.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038167">int propDefBeginCB (lefrCallbackType_e type,<dd> void* dummy,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038168"> // Check if the type is correct<dd> if (type != lefrPropBeginCbkType) {<dd> printf("Type is not lefrPropBeginCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038169"> printf("PROPERTYDEFINITIONS\n");<dd> return 0;}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<p><a name="1038170">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrPropCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiProp</font>. This callback routine will be called for each defined property definition.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038171">int propDefCB (lefrCallbackType_e type,<dd> lefiProp* propInfo,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038172"> // Check if the type is correct<dd> if (type != lefrPropCbkType) {<dd> printf("Type is not lefrPropCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038173"> // Check the object type of the property definition<dd> if (strcmp(propInfo->propType(), "library") == 0)<dd> printf("LIBRARY %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "pin") == 0)<dd> printf("PIN %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "macro") == 0)<dd> printf("MACRO %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "via") == 0)<dd> printf("VIA %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "viarule") == 0)<dd> printf("VIARULE %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "layer") == 0)<dd> printf("LAYER %s ", propInfo->propName());<dd> else if (strcmp(propInfo->propType(), "nondefaultrule") == 0<dd> printf("NONDEFAULTRULE %s ", propInfo->propName());<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1039586"> // Check the property type<dd> if (propInfo->dataType() == 'I')<dd> printf("INTEGER ");<dd> if (propInfo->dataType() == 'R')<dd> printf("REAL ");<dd> if (propInfo->dataType() == 'S')<dd> printf("STRING ");<dd> if (propInfo->dataType() == 'Q')<dd> printf("STRING ");<dd> if (propInfo->hasRange()) {<dd> printf("RANGE %g %g ", propInfo->left(), propInfo-<dd> >right());<dd> }<dd> if (propInfo->hasNumber())<dd> printf("%g ", propInfo->number());<dd> if (propInfo->hasString())<dd> printf("'%s' ", propInfo->string());<dd><dd> printf("\n");<dd><dd> return 0;}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<p><a name="1039587">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrPropEndCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">void *</font>. This callback routine marks the end of the Property Definition section.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038176">int propDefEndCB (lefrCallbackType_e type,<dd> void* dummy,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038177"> // Check if the type is correct<dd> if (type != lefrPropEndCbkType) {<dd> printf("Type is not lefrPropEndCbkType, terminate<dd> parsing.\n");<dd> return 1;}<dd><dd> printf("END PROPERTYDEFINITIONS\n");<dd> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038189">Same-Net Spacing Class</a></h2>
|
|||
|
<p><a name="1038190">The LEF </a><font size="2" face="'Courier New'" color="#000000">SPACING</font> routines include the following LEF class:</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="#lefiSpacing" title="4" name="1038194"><font color="Blue"><u>lefiSpacing</u></font></a><a href="#lefiSpacing" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiSpacing"></a><a name="1038211">lefiSpacing</a></h3>
|
|||
|
<p><a name="1038212">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">SPACING</font> statement in the LEF file. </p>
|
|||
|
<h4><a name="1038217">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038218">class lefiSpacing {<dd>int hasStack() const;<dd>const char* name1() const;<dd>const char* name2() const;<dd>double distance() const;};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038246">Same-Net Spacing Examples</a></h3>
|
|||
|
<p><a name="1038247">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrSpacingCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiSpacing</font>. This callback routine is called for each defined spacing between callback routines with the types <font size="2" face="'Courier New'" color="#000000">lefrSpacingBeginCbkType</font> and <font size="2" face="'Courier New'" color="#000000">lefrSpacingEndCbkType</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038248">int spacingCB (lefrCallbackType_e type,<dd> lefiSpacing* spacingInfo,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038249"> // Check if the type is correct<dd> if (type != lefrSpacingCbkType) {<dd> printf("Type is not lefrSpacingCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038250"> printf("SAMENET %s %s %g ", spacingInfo->name1(),<dd> spacingInfo->name2(), spacingInfo->distance());<dd> if (spacingInfo->hasStack())<dd> printf("STACK ");<dd> printf("\n");<dd><dd> return 0; }</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038259">Site Classes</a></h2>
|
|||
|
<p><a name="1038260">The LEF </a><font size="2" face="'Courier New'" color="#000000">SITE</font> routines include the following LEF class:</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="#lefiSite" title="4" name="1038264"><font color="Blue"><u>lefiSite</u></font></a><a href="#lefiSite" title="4"> </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="#lefiSitePattern" title="4" name="1058103"><font color="#0000ff"><u>lefiSitePattern</u></font></a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiSite"></a><a name="1038163">lefiSite</a></h3>
|
|||
|
<p><a name="1033086">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">SITE</font> statement of the LEF file. </p>
|
|||
|
<p><a name="1033090">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">SITE</font> statement, see <a href="../lefdefref/LEFSyntax.html#Site" target="external_window"><font color="#0000ff"><u>"Site"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1014306">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1014307">class lefiSite {<dd>const char* name() const;<dd>int hasClass() const;<dd>const char* siteClass() const;<dd>double sizeX() const;<dd>double sizeY() const;<dd>int hasSize() const;<dd>int hasXSymmetry() const;<dd>int hasYSymmetry() const;<dd>int has90Symmetry() const;<dd>int hasRowPattern() const;<dd>int numSites() const;<dd>char* siteName(int index) const;<dd>int siteOrient(int index) const;<dd>char* siteOrientStr(int index) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiSitePattern"></a><a name="1058076">lefiSitePattern</a></h3>
|
|||
|
<p><a name="1058096">Retrieves site pattern information from the </a><font size="2" face="'Courier New'" color="#000000">SITE</font> statement of the LEF file. </p>
|
|||
|
<p><a name="1058098">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">SITE</font> statement, see <a href="../lefdefref/LEFSyntax.html#Site" target="external_window"><font color="#0000ff"><u>"Site"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1058081">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058082">lefiSitePattern {<dd>const char* name() const;<dd>int orient() const;<dd>const char* orientStr() const;<dd>double x() const;<dd>double y() const;<dd>int hasStepPattern () const;<dd>double xStart() const;<dd>double yStart() const;<dd>double xStep() const;<dd>double yStep() const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038917">Site Examples</a></h3>
|
|||
|
<p><a name="1038280">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrSiteCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiSite</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038281">int siteCB (lefrCallbackType_e type,<dd> lefiSite* siteInfo,<dd> lefiUserData userData) {<dd> int hasPrtSym = 0;<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038282"> // Check if the type is correct<dd> if (type != lefrSiteCbkType) {<dd> printf("Type is not lefrSiteCbkType, terminate<dd> parsing.\n");<dd> return 1;<dd> }<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038283"> printf("SITE %s\n", siteInfo->name());<dd> if (siteInfo->hasClass())<dd> printf(" CLASS %s\n", siteInfo->siteClass());<dd> if (siteInfo->hasXSymmetry()) {<dd> printf(" SYMMETRY X ");<dd> hasPrtSym = 1; // set the flag that the keyword SYMMETRY<dd> has written<dd> }<dd> if (siteInfo->hasYSymmetry()) {<dd> if (hasPrtSym)<dd> printf("Y ");<dd> else { // keyword SYMMETRY has not been written yet<dd> printf(" SYMMETRY Y ");<dd> hasPrtSym = 1;<dd> }<dd> }<dd> if (siteInfo->has90Symmetry()) {<dd> if (hasPrtSym)<dd> printf("R90 ");<dd> else {<dd> printf(" SYMMETRY R90 ");<dd> hasPrtSym = 1;<dd> }<dd> }<dd> if (hasPrtSym)<dd> printf("\n");<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1057338"> if (siteInfo->hasSize())<dd> printf(" SIZE %g BY %g\n", siteInfo->sizeX(),<dd> siteInfo->sizeY());<dd> printf("END %s\n", siteInfo->name());<dd> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1057340">Units Class</a></h2>
|
|||
|
<p><a name="1038302">The LEF </a><font size="2" face="'Courier New'" color="#000000">UNITS</font> routines include the following LEF class:</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="#1038312" title="4" name="1038306"><font color="Blue"><u>lefiUnits</u></font></a><a href="#1038312" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="1038312">lefiUnits</a></h3>
|
|||
|
<p><a name="1038326">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">UNITS</font> statement of the LEF file. This statement defines the units of measure in LEF. </p>
|
|||
|
<p><a name="1038313">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">UNITS</font> statement, see <a href="../lefdefref/LEFSyntax.html#Units" target="external_window"><font color="#0000ff"><u>"Units"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038318">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038319">class lefiUnits {<dd>int hasDatabase();<dd>int hasCapacitance();<dd>int hasResistance();<dd>int hasTime();<dd>int hasPower();<dd>int hasCurrent();<dd>int hasVoltage();<dd>int hasFrequency();</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038320"> const char* databaseName();<dd>double databaseNumber();<dd>double capacitance();<dd>double resistance();<dd>double time();<dd>double power();<dd>double current();<dd>double voltage();<dd>double frequency();};</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038332">Units Examples</a></h3>
|
|||
|
<p><a name="1038333">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrUnitsCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiUnits</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038334">int unitsCB (lefrCallbackType_e type,<dd> lefiUnits* unitInfo,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038335"> // Check if the type is correct<dd> if (type != lefrUnitsCbkType) {<dd> printf("Type is not lefrUnitsCbkType, terminate<dd> parsing.\n");<dd> return 1;}<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038336"> printf("UNITS\n");<dd> if (unitInfo->hasDatabase())<dd> printf(" DATABASE %s %g\n", unitInfo->databaseName(),<dd> unitInfo->databaseNumber());<dd> if (unitInfo->hasCapacitance())<dd> printf(" CAPACITANCE PICOFARADS %g\n",<dd> unitInfo->capacitance());<dd> if (unitInfo->hasResistance())<dd> printf(" RESISTANCE OHMS %g\n", unitInfo->resistance());<dd> if (unitInfo->hasPower())<dd> printf(" POWER MILLIWATTS %g\n", unitInfo->power());<dd> if (unitInfo->hasCurrent())<dd> printf(" CURRENT MILLIAMPS %g\n", unitInfo->current());<dd> if (unitInfo->hasVoltage())<dd> printf(" VOLTAGE VOLTS %g\n", unitInfo->voltage());<dd> if (unitInfo->hasFrequency())<dd> printf(" FREQUENCY MEGAHERTZ %g\n", unitInfo-<dd> >frequency());<dd> printf("END UNITS\n");<dd> return 0;};</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1050128">Use Min Spacing Class</a></h2>
|
|||
|
<p><a name="1050143">The LEF </a><font size="2" face="'Courier New'" color="#000000">USEMINSPACING</font> routines include the following LEF class:</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="#lefiUseMinSpacing" title="4" name="1050144"><font color="Blue"><u>lefiUseMinSpacing</u></font></a><a href="#lefiUseMinSpacing" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiUseMinSpacing"></a><a name="1050146">lefiUseMinSpacing</a></h3>
|
|||
|
<p><a name="1050137">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">USEMINSPACING</font> statement of the LEF file.</p>
|
|||
|
<p><a name="1053102">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">USEMINSPACING</font> statement, see <a href="../lefdefref/LEFSyntax.html#UseMinSpacing" target="external_window"><font color="#0000ff"><u>"Use Min Spacing"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1050138">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1050136">class lefiUseMinSpacing { <dd>const char* name() const; <dd>int value() const;};</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038345">Via Classes</a></h2>
|
|||
|
<p><a name="1038346">The LEF </a><font size="2" face="'Courier New'" color="#000000">VIA</font> routines include the following LEF classes:</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="#1038372" title="4" name="1038350"><font color="Blue"><u>lefiVia</u></font></a><a href="#1038372" title="4"> </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="#lefiViaLayer" title="4" name="1038354"><font color="Blue"><u>lefiViaLayer</u></font></a><a href="#lefiViaLayer" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiUnits"></a><a name="lefiVia"></a><a name="1038372">lefiVia</a></h3>
|
|||
|
<p><a name="1038373">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">VIA</font> section of the LEF file. </p>
|
|||
|
<p><a name="1038539">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">VIA</font> section, see <a href="../lefdefref/LEFSyntax.html#Via" target="external_window"><font color="#0000ff"><u>"Via"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038378">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038379">class lefiVia {<dd>int hasDefault() const ;<dd>int hasGenerated() const;<dd>int hasForeign() const ; // optional - for information, see <dd> // </a><a href="ch1Intro.html#1019049" title="1"><font color="DodgerBlue"><u>Orientation Codes</u></font></a><a href="ch1Intro.html#1019049" title="1"> </a> <dd>int hasForeignPnt() const ;<dd>int hasForeignOrient() const ;<dd>int hasProperties() const ;<dd>int hasResistance() const ;<dd>int hasTopOfStack() const ;</font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038380"> int numLayers() const;<dd>char* layerName(int layerNum) const;<dd>int numRects(int layerNum) const;<dd>double xl(int layerNum, int rectNum) const;<dd>double yl(int layerNum, int rectNum) const;<dd>double xh(int layerNum, int rectNum) const;<dd>double yh(int layerNum, int rectNum) const;<dd>int numPolygons(int layerNum) const;<dd>struct lefiGeomPolygon getPolygon(int layerNum, int polyNum) const;<dd><dd>char* name() const ;<dd>double resistance() const ;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1062080"> int numProperties() const ;<dd>char* propName(int index) const;<dd>char* propValue(int index) const;<dd>double propNumber(int index) const;<dd>char propType(int index) const:<dd>int propIsNumber(int index) const;<dd>int propIsString(int index) const;<dd>char* foreign() const;<dd>double foreignX() const;<dd>double foreignY() const;<dd>int foreignOrient() const;<dd>char* foreignOrientStr() const; <dd><dd>int hasViaRule() const;<dd>const char* viaRuleName() const;<dd>double xCutSize() const;<dd>double yCutSize() const;<dd>const char* botMetalLayer() const;<dd>const char* cutLayer() const;<dd>const char* topMetalLayer() const;<dd>double xCutSpacing() const;<dd>double yCutSpacing() const;<dd>double xBotEnc() const;<dd>double yBotEnc() const;<dd>double xTopEnc() const;<dd>double yTopEnc() const;<dd>int hasRowCol() const;<dd>int numCutRows() const;<dd>int numCutCols() const;<dd>int hasOrigin() const;<dd>double xOffset() const;<dd>double yOffset() const;<dd>int hasOffset() const;<dd>double xBotOffset() const;<dd>double yBotOffset() const;<dd>double xTopOffset() const;<dd>double yTopOffset() const;<dd>int hasCutPattern() const;<dd>const char* cutPattern() const; <dd><dd> double </a><font size="2" face="'Courier New'" color="#000000"><em>xl</em></font>, <dd> double <font size="2" face="'Courier New'" color="#000000"><em>yl</em></font>,<dd> double <font size="2" face="'Courier New'" color="#000000"><em>xh</em></font>,<dd> double <font size="2" face="'Courier New'" color="#000000"><em>yh</em></font>);<dd> lefiGeometries* geom); <dd>int rectColorMask(int layerNum, <dd> int rectNum); <dd>int polyColorMask(int layerNum, <dd> int rectNum); };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiViaLayer"></a><a name="1039637">lefiViaLayer</a></h3>
|
|||
|
<p><a name="1039638">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> statement within the <font size="2" face="'Courier New'" color="#000000">VIA</font> section of the LEF file. The members of the C++ class and C structures correspond to elements of the <font size="2" face="'Courier New'" color="#000000">LAYER</font> statement in the <font size="2" face="'Courier New'" color="#000000">VIA</font> section. </p>
|
|||
|
<p><a name="1039642">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">VIA</font> section, see <a href="../lefdefref/LEFSyntax.html#Via" target="external_window"><font color="#0000ff"><u>"Via"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038446">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1061515">class lefiViaLayer {<dd>int numRects();<dd>char* name();<dd>double xl(int index);<dd>double yl(int index);<dd>double xh(int index);<dd>double yh(int index);<dd>int numPolygons();<dd>struct lefiGeomPolygon* getPolygon(int index) const; <dd><dd> double </a><font size="2" face="'Courier New'" color="#000000"><em>xl</em></font>,<dd> double <font size="2" face="'Courier New'" color="#000000"><em>yl<dd></em></font> double <font size="2" face="'Courier New'" color="#000000"><em>xh<dd></em></font> double <font size="2" face="'Courier New'" color="#000000"><em>yn</em></font>);<dd> lefiGeometries* geom);<dd>int rectColorMask(int index); <dd>int polyColorMask(int index); };</font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038565">Via Examples</a></h3>
|
|||
|
<p><a name="1038566">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrViaCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiVia</font>.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038567">int viaCB (lefrCallbackType_e type,<dd> lefiVia* viaInfo,<dd> lefiUserData userData) {<dd></a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038568"> int i, j;<dd><dd> // Check if the type is correct<dd> if (type != lefrViaCbkType) {<dd> printf("Type is not lefrViaCbkType, terminate<dd> parsing.\n");<dd> return 1;}<dd><dd> printf("VIA %s ", viaInfo->lefiVia::name());<dd> if (viaInfo->hasDefault())<dd> printf("DEFAULT\n");<dd> else<dd> printf("\n");<dd> if (viaInfo->hasTopOfStack())<dd> printf(" TOPOFSTACKONLY\n");<dd> if (viaInfo->hasForeign()) {<dd> printf(" FOREIGN %s ", viaInfo->foreign());<dd> if (viaInfo->hasForeignPnt()) {<dd> printf("( %g %g ) ", viaInfo->foreignX(), <dd> viaInfo->foreignY());<dd> if (viaInfo->hasForeignOrient())<dd> printf("%s ", orientStr(viaInfo->foreignOrient()));<dd> }<dd> printf("\n");<dd> }<dd> if (viaInfo->hasProperties()) {<dd> printf(" PROPERTY ");<dd> for (i = 0; i < viaInfo->numProperties(); i++) {<dd> printf("%s ", viaInfo->propName(i));<dd> if (viaInfo->propIsNumber(i))<dd> printf("%g ", viaInfo->propNumber(i));<dd> if (viaInfo->propIsString(i))<dd> printf("%s ", viaInfo->propValue(i));<dd> }<dd> printf("\n");<dd> }<dd> if (viaInfo->hasResistance())<dd> printf(" RESISTANCE %g\n", viaInfo->resistance());<dd> if (viaInfo->numLayers() > 0) {<dd> for (i = 0; i < viaInfo->numLayers(); i++) {<dd> printf(" LAYER %s\n", viaInfo->layerName(i));<dd> for (j = 0; j < viaInfo->numRects(i); j++)<dd> printf(" RECT ( %g %g ) ( %g %g )\n",<br> viaInfo->xl(i, j), viaInfo->yl(i, j),<br> viaInfo->xh(i, j), viaInfo->yh(i, j));<br> }<br> }<br> printf("END %s\n", viaInfo->name());<br> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<h2><a name="1038580">Via Rule Classes</a></h2>
|
|||
|
<p><a name="1038581">The LEF </a><font size="2" face="'Courier New'" color="#000000">VIARULE</font> routines include the following LEF classes:</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="#lefiViaRule" title="4" name="1055217"><font color="Blue"><u>lefiViaRule</u></font></a><a href="#lefiViaRule" title="4"> </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="#lefiViaRuleLayer" title="4" name="1055223"><font color="Blue"><u>lefiViaRuleLayer</u></font></a><a href="#lefiViaRuleLayer" title="4"> </a></td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
</div>
|
|||
|
<h3><a name="lefiViaRule"></a><a name="1055227">lefiViaRule</a></h3>
|
|||
|
<p><a name="1038560">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">VIARULE</font> and <font size="2" face="'Courier New'" color="#000000">VIARULE</font> <font size="2" face="'Courier New'" color="#000000">GENERATE</font> statements of the LEF file.</p>
|
|||
|
<p><a name="1039649">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">VIARULE</font> and <font size="2" face="'Courier New'" color="#000000">VIARULE</font> <font size="2" face="'Courier New'" color="#000000">GENERATE</font> statements, see <a href="../lefdefref/LEFSyntax.html#ViaRule" target="external_window"><font color="#0000ff"><u>"Via Rule,"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#ViaRuleGenerate" target="external_window"><font color="#0000ff"><u>"Via Rule Generate"</u></font></a> in the <font color="#000000"><em>LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038468">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038469">class lefiViaRule {<dd>int hasGenerate() const;<dd>int hasDefault() const;<dd>char* name() const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1053164"> int numLayers() const;<dd></a><font color="#0000ff"><u>lefiViaRuleLayer</u></font>* layer(int index);</font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1053166"> int numVias() const;<dd>char* viaName(int index) const; </a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038473"> int numProps() const;<dd>const char* propName(int index) const;<dd>const char* propValue(int index) const;<dd>double propNumber(int index) const;<dd>const char propType(int index) const;<dd>int propIsNumber(int index) const;<dd>int propISString(int index) const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="lefiViaRuleLayer"></a><a name="1038659">lefiViaRuleLayer</a></h3>
|
|||
|
<p><a name="1038660">Retrieves data from the </a><font size="2" face="'Courier New'" color="#000000">LAYER</font> statement within the <font size="2" face="'Courier New'" color="#000000">VIARULE</font> and <font size="2" face="'Courier New'" color="#000000">VIARULE</font> <font size="2" face="'Courier New'" color="#000000">GENERATE</font> statements of the LEF file. </p>
|
|||
|
<p><a name="1038666">For syntax information about the LEF </a><font size="2" face="'Courier New'" color="#000000">VIARULE</font> and <font size="2" face="'Courier New'" color="#000000">VIARULE</font> <font size="2" face="'Courier New'" color="#000000">GENERATE</font> statements, see <a href="../lefdefref/LEFSyntax.html#ViaRule" target="external_window"><font color="#0000ff"><u>"Via Rule,"</u></font></a> and <a href="../lefdefref/LEFSyntax.html#ViaRuleGenerate" target="external_window"><font color="#0000ff"><u>"Via Rule Generate"</u></font></a> in the<font color="#000000"><em> LEF/DEF Language Reference</em></font>.</p>
|
|||
|
<h4><a name="1038668">C++ Syntax</a></h4>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038669">class lefiViaRuleLayer {<dd>int hasDirection() const;<dd>int hasEnclosure() const;<dd>int hasWidth() const;<dd>int hasResistance() const;<dd>int hasOverhang() const;<dd>int hasMetalOverhang() const;<dd>int hasSpacing() const;<dd>int hasRect() const;</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038670"> char* name() const;<dd>int isHorizontal() const;<dd>int isVertical() const;<dd>double enclosureOverhang1() const;<dd>double enclosureOverhang2() const;<dd>double widthMin() const;<dd>double widthMax() const;<dd>double overhang() const;<dd>double metalOverhang() const;<dd>double resistance() const;<dd>double spacingStepX() const;<dd>double spacingStepY() const;<dd>double xl() const; <dd>double yl() const;<dd>double xh() const;<dd>double yh() const; };</a></font>
|
|||
|
</dl>
|
|||
|
<h3><a name="1038719">Via Rule Examples</a></h3>
|
|||
|
<p><a name="1038720">The following example shows a callback routine with the type </a><font size="2" face="'Courier New'" color="#000000">lefrViaRuleCbkType</font>, and the class <font size="2" face="'Courier New'" color="#000000">lefiViaRule</font>. This example also shows how to retrieve data from the <font size="2" face="'Courier New'" color="#000000">lefiViaRuleLayer</font> class.</p>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1038721">int viaRuleCB (lefrCallbackType_e type,<dd> lefiViaRule* viaRuleInfo,<dd> lefiUserData userData) {<dd><dd> int numLayers, numVias, i;<dd> lefiViaRuleLayer* vLayer;<dd><dd> printf("VIARULE %s", viaRuleInfo->name());<dd> if (viaRuleInfo->hasGenerate())<dd> printf(" GENERATE\n");<dd> else<dd> printf("\n");<dd><dd> numLayers = viaRuleInfo->numLayers();<dd> // If numLayers == 2, it is VIARULE without GENERATE and has<dd> // via name. If numLayers == 3, it is VIARULE with GENERATE, and<dd> // the 3rd layer is cut.<dd> for (i = 0; i < numLayers; i++) {<dd> vLayer = viaRuleInfo->layer(i);<dd> printf(" LAYER %s\n", vLayer->name());<dd> if (vLayer->hasDirection()) {<dd> if (vLayer->isHorizontal())<dd> printf(" DIRECTION HORIZONTAL\n");<dd> if (vLayer->isVertical())<dd> printf(" DIRECTION VERTICAL\n");<dd> }<dd> if (vLayer->hasWidth())<dd> printf(" WIDTH %g TO %g\n", vLayer->widthMin(),<dd> vLayer->widthMax());<dd> if (vLayer->hasResistance())<dd> printf(" RESISTANCE %g\n", vLayer->resistance());<dd> if (vLayer->hasOverhang())<dd> printf(" OVERHANG %g\n", vLayer->overhang());<dd> if (vLayer->hasMetalOverhang())<dd> printf(" METALOVERHANG %g\n", vLayer-<dd> >metalOverhang());<dd> if (vLayer->hasSpacing())<dd> printf(" SPACING %g BY %g\n", vLayer->spacingStepX(),<dd> vLayer->spacingStepY());<dd> if (vLayer->hasRect())<br> printf(" RECT ( %g %g ) ( %g %g )\n", vLayer->xl(),<br> vLayer->yl(), vLayer->xh(), vLayer->yh()); }<br><br> if (numLayers == 2) { // should have vianames<br> numVias = viaRuleInfo->numVias();<br> if (numVias == 0)<br> printf("Should have via names in VIARULE.\n");<br> else {<br> for (i = 0; i < numVias; i++)<br> printf(" VIA %s\n", viaRuleInfo->viaName(i));<br> }<br> }<br> printf("END %s\n", viaRuleInfo->name());<br> return 0;}</a></font>
|
|||
|
</dl>
|
|||
|
<dl>
|
|||
|
<font size="2" face="'Courier New'" color="#000000"><a name="1058840"> </a></font>
|
|||
|
</dl>
|
|||
|
</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="lefapiTOC.html"><img src="../support/nav2_toc.gif" alt="Table of Contents" border="0"></a>
|
|||
|
</td>
|
|||
|
|
|||
|
<td height="20" width="46">
|
|||
|
<img src="../support/nav2_index_b.gif" border="0">
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="ch3LEFcallback.html"><img src="images/nav2_previous.gif" alt="Previous" border="0"></a>
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="ch5LEFwritercallback.html"><img src="images/nav_next.gif" alt="Next" border="0"></a>
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a>
|
|||
|
<a href="lefapi.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 © 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>
|