Merge branch 'master' into bplane

Conflicts:
	VERSION
	extract/ExtMain.c
	lef/lefWrite.c

Pulled master branch changes to lefWrite into the bplane branch.
This commit is contained in:
Tim Edwards 2020-03-25 11:23:16 -04:00
commit 79ada35815
2 changed files with 30 additions and 7 deletions

View File

@ -4044,6 +4044,8 @@ DRCGetDefaultLayerSurround(ttype1, ttype2)
* itself, where one of the shapes has width greater than "twidth".
* The result value is in magic internal units.
*
* If "twidth" is zero, then return the maximum spacing rule distance.
*
* Side effects:
* None.
*
@ -4066,7 +4068,7 @@ DRCGetDefaultWideLayerSpacing(ttype, twidth)
if (cptr->drcc_flags & DRC_TRIGGER) /* Widespacing rule */
{
widerule = TRUE;
if (cptr->drcc_dist > twidth) /* Check against rule width */
if (twidth > 0 && cptr->drcc_dist > twidth) /* Check against rule width */
return routeSpacing;
}
if (widerule && ((cptr->drcc_flags & DRC_REVERSE) == 0)) /* FORWARD only */

View File

@ -1103,10 +1103,14 @@ lefWriteMacro(def, f, scale, hide)
for (thislll = lll; thislll; thislll = thislll->lll_next)
{
int lspacex, lspacey, lwidth;
int lspacex, lspacey, lwidth, mspace;
lab = thislll->lll_label;
mspace = DRCGetDefaultWideLayerSpacing(lab->lab_type, 0);
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;
@ -1118,12 +1122,29 @@ lefWriteMacro(def, f, scale, hide)
if (lspacey == 0)
lspacey = DRCGetDefaultLayerSpacing(lab->lab_type, lab->lab_type);
thislll->lll_area.r_xbot -= lspacex;
thislll->lll_area.r_ybot -= lspacey;
thislll->lll_area.r_xtop += lspacex;
thislll->lll_area.r_ytop += lspacey;
DBErase(lc.lefYank, &thislll->lll_area, 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;
DBErase(lc.lefYank, &thislll->lll_area, lab->lab_type);
freeMagic(thislll);
}
}