From e3624d3e5f5e6f729fa0764660b76f24bffc8ee2 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Tue, 12 Nov 2019 21:46:52 -0500 Subject: [PATCH] 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. --- lef/lefWrite.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lef/lefWrite.c b/lef/lefWrite.c index 8e2106c4..da03bacf 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -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;