From 35a65a9ba189763384829b351d58f1c0a61dafd6 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Wed, 15 Sep 2021 14:45:14 -0400 Subject: [PATCH] Corrected the "def read" command so that when reading PIN blocks, all geometry will be handled; the previous behavior expected only a single rectangle per pin and so would only acknowledge the last entry in any list of rectangles for the pin. --- VERSION | 2 +- lef/defRead.c | 37 +++++++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/VERSION b/VERSION index 075299af..bcefa5ce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.208 +8.3.209 diff --git a/lef/defRead.c b/lef/defRead.c index 3e1bdd71..0f8a702f 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -945,6 +945,7 @@ DefReadPins(f, rootDef, sname, oscale, total) int pinUse = PORT_USE_DEFAULT; int pinNum = 0; TileType curlayer = -1; + LinkedRect *rectList = NULL, *newRect; Rect *currect, topRect; Transform t; lefLayer *lefl; @@ -1108,6 +1109,13 @@ DefReadPins(f, rootDef, sname, oscale, total) case DEF_PINS_PROP_LAYER: curlayer = LefReadLayer(f, FALSE); currect = LefReadRect(f, curlayer, oscale); + + newRect = (LinkedRect *)mallocMagic(sizeof(LinkedRect)); + newRect->r_type = curlayer; + newRect->r_r = *currect; + newRect->r_next = rectList; + rectList = newRect; + if (pending) { /* If layer was unknown, set to space and force */ @@ -1118,10 +1126,16 @@ DefReadPins(f, rootDef, sname, oscale, total) else flags |= LABEL_STICKY; - GeoTransRect(&t, currect, &topRect); - DBPaint(rootDef, &topRect, curlayer); - DBPutLabel(rootDef, &topRect, -1, pinname, curlayer, - pinNum | pinDir | pinUse | flags); + while (rectList != NULL) + { + GeoTransRect(&t, &rectList->r_r, &topRect); + DBPaint(rootDef, &topRect, rectList->r_type); + DBPutLabel(rootDef, &topRect, -1, pinname, + rectList->r_type, + pinNum | pinDir | pinUse | flags); + freeMagic(rectList); + rectList = rectList->r_next; + } pending = FALSE; pinNum++; } @@ -1141,10 +1155,17 @@ DefReadPins(f, rootDef, sname, oscale, total) else flags |= LABEL_STICKY; - GeoTransRect(&t, currect, &topRect); - DBPaint(rootDef, &topRect, curlayer); - DBPutLabel(rootDef, &topRect, -1, pinname, curlayer, - pinNum | pinDir | pinUse | flags); + while (rectList != NULL) + { + GeoTransRect(&t, &rectList->r_r, &topRect); + DBPaint(rootDef, &topRect, rectList->r_type); + DBPutLabel(rootDef, &topRect, -1, pinname, + rectList->r_type, + pinNum | pinDir | pinUse | flags); + freeMagic(rectList); + rectList = rectList->r_next; + } + pending = FALSE; pinNum++; } break;