From e296fc5ba0e4660b75a7281ad44c57a9277c1073 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 1 Apr 2020 08:59:19 -0400 Subject: [PATCH 1/3] Corrected an error in lefWrite that should have avoided degenerate labels by expanding a zero area label rectangle, but then if "select chunk" returns nothing, it sets the area to the zero area label rectangle instead of the expanded one that it just created. This is the reason that "lef write" is producing pins with no geometry in the LEF file output. --- VERSION | 2 +- lef/lefWrite.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 9817229c..c6c22694 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.2.207 +8.2.208 diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 193ab5de..872da6b8 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -973,7 +973,7 @@ lefWriteMacro(def, f, scale, hide) labelLinkedList *newlll; SelectChunk(&scx, lab->lab_type, 0, &carea, FALSE); - if (GEO_RECTNULL(&carea)) carea = lab->lab_rect; + if (GEO_RECTNULL(&carea)) carea = labr; /* Note that a sticky label could be placed over multiple */ /* tile types, which would cause SelectChunk to fail. So */ From d6cadeb0cd8192c21e241a12a5bf917be2f45509 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 1 Apr 2020 10:39:43 -0400 Subject: [PATCH 2/3] Decided that "lef write -hide" should always use widespacing rules, because otherwise all pins will flag metal-to-obstruction spacing within the cell if the cell is wide enough that the obstruction layer satisfies the width requirement for the rule. It is too complicated to try to find specific places where the wide spacing might not be needed. Potentially this could be a problem for technologies that define a number of graded wide-spacing rules, as the largest-width rule is always used now by "lef write -hide", and the largest-width rule could theoretically allow enough space to route through, which would cause a short that cannot be detected. That would be a pathological case that may not show up in practice. --- lef/lefWrite.c | 40 +++++++--------------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 872da6b8..e84b598c 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -1104,46 +1104,20 @@ lefWriteMacro(def, f, scale, hide) for (thislll = lll; thislll; thislll = thislll->lll_next) { - int lspacex, lspacey, lwidth, mspace; + int mspace; lab = thislll->lll_label; + /* Look for wide spacing rules. If there are no wide spacing */ + /* rules, then fall back on the default spacing rule. */ mspace = DRCGetDefaultWideLayerSpacing(lab->lab_type, 1E6); if (mspace == 0) mspace = DRCGetDefaultLayerSpacing(lab->lab_type, lab->lab_type); - /* Look for wide spacing rules. If there are no wide spacing */ - /* rules, then fall back on the default spacing rule. */ - lwidth = thislll->lll_area.r_xtop - thislll->lll_area.r_xbot; - lspacex = DRCGetDefaultWideLayerSpacing(lab->lab_type, lwidth); - if (lspacex == 0) - lspacex = DRCGetDefaultLayerSpacing(lab->lab_type, lab->lab_type); - lwidth = thislll->lll_area.r_ytop - thislll->lll_area.r_ybot; - lspacey = DRCGetDefaultWideLayerSpacing(lab->lab_type, lwidth); - if (lspacey == 0) - lspacey = DRCGetDefaultLayerSpacing(lab->lab_type, lab->lab_type); - - /* Is the label touching the boundary? If so, then use the */ - /* maximum space from the inside edge. */ - if (thislll->lll_area.r_xtop >= boundary.r_xtop) - thislll->lll_area.r_xbot -= mspace; - else - thislll->lll_area.r_xbot -= lspacex; - - if (thislll->lll_area.r_ytop >= boundary.r_ytop) - thislll->lll_area.r_ybot -= mspace; - else - thislll->lll_area.r_ybot -= lspacey; - - if (thislll->lll_area.r_xbot <= boundary.r_xbot) - thislll->lll_area.r_xtop += mspace; - else - thislll->lll_area.r_xtop += lspacex; - - if (thislll->lll_area.r_ybot <= boundary.r_ybot) - thislll->lll_area.r_ytop += mspace; - else - thislll->lll_area.r_ytop += lspacey; + thislll->lll_area.r_xbot -= mspace; + thislll->lll_area.r_ybot -= mspace; + thislll->lll_area.r_xtop += mspace; + thislll->lll_area.r_ytop += mspace; DBErase(lc.lefYank, &thislll->lll_area, lab->lab_type); freeMagic(thislll); From e98b768c45491d2e5e9be71f7a1c6eabecd86737 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 1 Apr 2020 11:01:13 -0400 Subject: [PATCH 3/3] Corrected "lef write" to add the SITE definition that it may have been preserving in the cell properties (which was inadvertently omitted). --- lef/lefWrite.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index e84b598c..7cdcf75e 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -824,6 +824,10 @@ lefWriteMacro(def, f, scale, hide) if (propfound) fprintf(f, " SYMMETRY %s ;\n", propvalue); + propvalue = (char *)DBPropGet(def, "LEFsite", &propfound); + if (propfound) + fprintf(f, " SITE %s ;\n", propvalue); + /* Generate cell for yanking obstructions */ lc.lefYank = DBCellLookDef("__lefYank__");