diff --git a/VERSION b/VERSION index 8a296751..a20393fb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.60 +8.3.61 diff --git a/commands/CmdLQ.c b/commands/CmdLQ.c index 7d370314..1c008a1c 100644 --- a/commands/CmdLQ.c +++ b/commands/CmdLQ.c @@ -1407,7 +1407,7 @@ CmdPort(w, cmd) if (sl && ((sl->lab_flags & PORT_DIR_MASK) != 0)) if ((sl->lab_flags & PORT_NUM_MASK) == portidx) { - lab = sl; + lab = sl; break; } } @@ -1419,7 +1419,8 @@ CmdPort(w, cmd) if (!strcmp(portname, sl->lab_text)) { lab = sl; - break; + if (sl && ((sl->lab_flags & PORT_DIR_MASK) != 0)) + break; } } if (lab == NULL) diff --git a/lef/lefRead.c b/lef/lefRead.c index 2ae6c806..53ad5f07 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -1568,19 +1568,40 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported) if (is_imported) { bool needRect = TRUE; + bool hasPort = FALSE; Label *lab; + /* Conflicting interests: One purpose of annotation */ + /* is to make ports where none existed. But if the */ + /* cell has both port and non-port labels with the */ + /* same string, then don't mess with the non-port */ + /* label. */ + + for (lab = firstlab; lab; lab = lab->lab_next) + if (lab->lab_flags & PORT_DIR_MASK) + if (!strcmp(lab->lab_text, testpin)) + { + hasPort = TRUE; + break; + } + /* Skip the port geometry but find the pin name and */ /* annotate with the use and direction. Note that */ /* there may be multiple instances of the label. */ /* However, if the label is a point label, then */ /* replace it with the geometry from the LEF file. */ - for (lab = firstlab; lab; lab = lab->lab_next) + if (hasPort == FALSE) lab = firstlab; + for (; lab; lab = lab->lab_next) { if (!strcmp(lab->lab_text, testpin)) { - if (GEO_RECTNULL(&lab->lab_rect)) + /* If there is at least one port label with this */ + /* name, then ignore all non-port labels with the */ + /* same name. */ + if ((hasPort) && (!(lab->lab_flags & PORT_DIR_MASK))) + break; + else if (GEO_RECTNULL(&lab->lab_rect)) break; else {