From 54773957c99a304107bf37a392a0b51fad5dbcbf Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 18 Mar 2024 16:25:49 -0400 Subject: [PATCH] Corrected an issue with annotating a layout from a LEF file; if new port labels are created for an existing port, then they must take the existing port number. The code was previously causing collisions between port numbers on different pins. --- VERSION | 2 +- lef/lefRead.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 70773ddf..c1992c72 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.464 +8.3.465 diff --git a/lef/lefRead.c b/lef/lefRead.c index 38217b32..f1206c78 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -1432,8 +1432,24 @@ LefReadPort(lefMacro, f, pinName, pinNum, pinDir, pinUse, pinShape, oscale, } } else + { + /* If any other label is a port and has the same name, */ + /* then use its port number. */ + + Label *sl; + for (sl = lefMacro->cd_labels; sl != NULL; sl = sl->lab_next) + { + if (sl->lab_flags & PORT_DIR_MASK) + if (!strcmp(sl->lab_text, pinName)) + { + pinNum = sl->lab_port; + break; + } + } + /* Create a new label (non-rendered) */ DBPutLabel(lefMacro, &rectList->r_r, -1, pinName, rectList->r_type, 0, 0); + } /* Set this label to be a port */