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.
This commit is contained in:
Tim Edwards 2024-03-20 22:15:41 -04:00
parent fede9d5c4d
commit bfd938b5e2
1 changed files with 7 additions and 5 deletions

View File

@ -95,6 +95,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
bool valid = FALSE; /* is there a valid reference point? */ bool valid = FALSE; /* is there a valid reference point? */
bool initial = TRUE; bool initial = TRUE;
bool labeled = TRUE; bool labeled = TRUE;
bool iscontact = FALSE;
Rect locarea, r; Rect locarea, r;
int extend, lextend, hextend; int extend, lextend, hextend;
float x, y, z, w; float x, y, z, w;
@ -152,6 +153,9 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
/* invalidate reference point */ /* invalidate reference point */
valid = FALSE; valid = FALSE;
/* assume this is not a via unless found otherwise */
iscontact = FALSE;
token = LefNextToken(f, TRUE); token = LefNextToken(f, TRUE);
he = HashLookOnly(&LefInfo, token); he = HashLookOnly(&LefInfo, token);
@ -441,11 +445,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
routeList = addRoute; routeList = addRoute;
} }
/* Set paintLayer to the contact cut type */
paintLayer = lefl->type; paintLayer = lefl->type;
if (!DBIsContact(lefl->type))
if (lefl->info.via.lr != NULL)
paintLayer = lefl->info.via.lr->r_type;
newRoute->r_r.r_xbot = refp.p_x + lefl->info.via.area.r_xbot; newRoute->r_r.r_xbot = refp.p_x + lefl->info.via.area.r_xbot;
newRoute->r_r.r_ybot = refp.p_y + lefl->info.via.area.r_ybot; 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
newRoute->r_r.r_xtop >>= 1; newRoute->r_r.r_xtop >>= 1;
newRoute->r_r.r_ytop >>= 1; newRoute->r_r.r_ytop >>= 1;
iscontact = TRUE;
} }
else if ((paintLayer = DBTechNameType(LefLower(token))) >= 0) else if ((paintLayer = DBTechNameType(LefLower(token))) >= 0)
{ {
@ -480,7 +481,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
/* This is absolutely impossible to make consistent */ /* This is absolutely impossible to make consistent */
/* with the DEF spec, but there you have it. . . */ /* with the DEF spec, but there you have it. . . */
if (DBIsContact(paintLayer)) if (iscontact || (DBIsContact(paintLayer)))
{ {
TileTypeBitMask *rMask = DBResidueMask(paintLayer); TileTypeBitMask *rMask = DBResidueMask(paintLayer);
TileType stype; TileType stype;
@ -520,6 +521,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
paintExtend = (special) ? 0 : paintWidth; paintExtend = (special) ? 0 : paintWidth;
break; break;
} }
iscontact = FALSE;
} }
} }
else else