Added code to avoid a problem with "lef write" when a sticky label

is placed over multiple types.  This causes SelectChunk() to fail
and the pin will have no geometry output in the LEF file.  To avoid
this, the area of the label is always painted into the select cell
so that if SelectChunk() fails, the label area still exists with
the label tile type.
This commit is contained in:
Tim Edwards 2019-11-12 21:46:52 -05:00
parent 855e4ca134
commit e3624d3e5f
1 changed files with 12 additions and 0 deletions

View File

@ -933,7 +933,18 @@ lefWriteMacro(def, f, scale, hide)
SelectClear();
if (hide)
{
SelectChunk(&scx, lab->lab_type, 0, NULL, FALSE);
/* Note that a sticky label could be placed over multiple */
/* tile types, which would cause SelectChunk to fail. So */
/* always paint the label type into the label area in */
/* SelectDef. */
pNum = DBPlane(lab->lab_type);
DBPaintPlane(SelectDef->cd_planes[pNum], &lab->lab_rect,
DBStdPaintTbl(lab->lab_type, pNum), (PaintUndoInfo *) NULL);
}
else
SelectNet(&scx, lab->lab_type, 0, NULL, FALSE);
@ -1042,6 +1053,7 @@ lefWriteMacro(def, f, scale, hide)
scx.scx_area = labr;
SelectClear();
SelectChunk(&scx, lab->lab_type, 0, &carea, FALSE);
if (GEO_RECTNULL(&carea)) carea = lab->lab_rect;
lspace = DRCGetDefaultLayerSpacing(lab->lab_type, lab->lab_type);
carea.r_xbot -= lspace;
carea.r_ybot -= lspace;