Modified the LEF read routine to use the via geometry manipulations

from the cifoutput section, NOT the cifinput section.  This change
underscores the point that LEF and DEF formats define mask data,
and therefore all LEF and DEF routines should be using the CIF
input/output methods and layers.  That is a major code change;
meanwhile, getting via layer values from the cifoutput parameters
is slightly more reliable than using cifinput, since there is good
reason to use templayers to read vias, and that sort of indirection
makes it difficult to determine a simple relationship between a
LEF cut layer and a magic contact.
This commit is contained in:
Tim Edwards 2020-03-06 09:15:22 -05:00
parent a37fc1e242
commit 86cad629ec
1 changed files with 15 additions and 33 deletions

View File

@ -1770,10 +1770,18 @@ origin_error:
*
* For LEF contact types matching magic contact types, size the
* LEF contact cut to cover the minimum rectangle in the other
* layers that satisfies the CIF/GDS contact generation. Use
* the "cifinput" style to determine how much the via layer
* needs to grow to make a contact area. If the "cifinput"
* style is not defined, then determine rules from "cifoutput".
* layers that satisfies the CIF/GDS contact generation.
*
* NOTE: If a "cifinput" style is defined, then the via
* remains the size declared in LEF or DEF file, and the
* magic view of the via is generated by applying "cifinput"
* rules when painting into the magic database. If no input
* style is defined, then the output style rules are used to
* modify the cut size to match the way the via is defined in
* magic, and the result is painted directly.
*
* If a "cifinput" style exists, then this routine does
* nothing and has no side effects.
*
*------------------------------------------------------------
*/
@ -1783,36 +1791,10 @@ void LefGrowVia(curlayer, currect, lefl)
Rect *currect;
lefLayer *lefl;
{
if (DBIsContact(curlayer) && cifCurReadStyle != NULL)
{
int growSize;
/* To be completed: This should be deprecated by moving the entire */
/* LEF and DEF read routines to use the cifinput style. */
/* Get the amount (in magic units) that the layer needs to */
/* expand according to the "cifinput" style rules to convert */
/* a contact cut to a magic contact layer. */
growSize = CIFReadGetGrowSize(curlayer);
/* All internal LEF via geometry values are doubled */
growSize <<= 1;
if (growSize % cifCurReadStyle->crs_scaleFactor == 0)
growSize /= cifCurReadStyle->crs_scaleFactor;
else
growSize = growSize / cifCurReadStyle->crs_scaleFactor + 1;
if (growSize > 0)
{
/* cifinput styles expect the cut size to be correct, so */
/* there is no check for correctness of the layer. */
currect->r_xbot = currect->r_xbot - growSize;
currect->r_ybot = currect->r_ybot - growSize;
currect->r_xtop = currect->r_xtop + growSize;
currect->r_ytop = currect->r_ytop + growSize;
}
}
else if (DBIsContact(curlayer) && CIFCurStyle != NULL)
if (DBIsContact(curlayer) && CIFCurStyle != NULL)
{
int edgeSize = 0, contSize, halfSize;