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.
This commit is contained in:
parent
e296fc5ba0
commit
d6cadeb0cd
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue