Corrected a problem with both the "port" command and the "lef read"
command when annotating an existing layout from a LEF database, if there is a port in the layout that is shadowed by a label with the same name that is not a port.
This commit is contained in:
parent
b846c45056
commit
aac2c06dfd
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue