Skip to content

Commit bfd938b

Browse files
Correction to the previous bug fix: The layer was correct and
did not need to be changed, but the line below it that depended on the layer being a contact type was wrong; the contact had to be identified independently of the last layer type, which might not be the contact cut type.
1 parent fede9d5 commit bfd938b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lef/defRead.c

+7-5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
9595
bool valid = FALSE; /* is there a valid reference point? */
9696
bool initial = TRUE;
9797
bool labeled = TRUE;
98+
bool iscontact = FALSE;
9899
Rect locarea, r;
99100
int extend, lextend, hextend;
100101
float x, y, z, w;
@@ -152,6 +153,9 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
152153
/* invalidate reference point */
153154
valid = FALSE;
154155

156+
/* assume this is not a via unless found otherwise */
157+
iscontact = FALSE;
158+
155159
token = LefNextToken(f, TRUE);
156160

157161
he = HashLookOnly(&LefInfo, token);
@@ -441,11 +445,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
441445
routeList = addRoute;
442446
}
443447

444-
/* Set paintLayer to the contact cut type */
445448
paintLayer = lefl->type;
446-
if (!DBIsContact(lefl->type))
447-
if (lefl->info.via.lr != NULL)
448-
paintLayer = lefl->info.via.lr->r_type;
449449

450450
newRoute->r_r.r_xbot = refp.p_x + lefl->info.via.area.r_xbot;
451451
newRoute->r_r.r_ybot = refp.p_y + lefl->info.via.area.r_ybot;
@@ -457,6 +457,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
457457
newRoute->r_r.r_xtop >>= 1;
458458
newRoute->r_r.r_ytop >>= 1;
459459

460+
iscontact = TRUE;
460461
}
461462
else if ((paintLayer = DBTechNameType(LefLower(token))) >= 0)
462463
{
@@ -480,7 +481,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
480481
/* This is absolutely impossible to make consistent */
481482
/* with the DEF spec, but there you have it. . . */
482483

483-
if (DBIsContact(paintLayer))
484+
if (iscontact || (DBIsContact(paintLayer)))
484485
{
485486
TileTypeBitMask *rMask = DBResidueMask(paintLayer);
486487
TileType stype;
@@ -520,6 +521,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
520521
paintExtend = (special) ? 0 : paintWidth;
521522
break;
522523
}
524+
iscontact = FALSE;
523525
}
524526
}
525527
else

0 commit comments

Comments
 (0)