One additional place where the port number needed to be taken from

the existing label on "lef read", where the port record is never
read.
This commit is contained in:
Tim Edwards 2020-05-26 20:40:41 -04:00
parent 8b159a07cd
commit b6f4553cef
1 changed files with 20 additions and 0 deletions

View File

@ -1481,6 +1481,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
/* 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 = lefMacro->cd_labels; lab; lab = lab->lab_next)
{
if (!strcmp(lab->lab_text, pinname))
@ -1489,6 +1490,25 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
break;
else
{
if (lab->lab_flags & PORT_DIR_MASK)
pinNum = lab->lab_flags & PORT_NUM_MASK;
else
{
Label *sl;
int idx;
pinNum = -1;
for (sl = lefMacro->cd_labels; sl != NULL;
sl = sl->lab_next)
{
if (sl->lab_flags & PORT_DIR_MASK)
{
idx = sl->lab_flags & PORT_NUM_MASK;
if (idx > pinNum) pinNum = idx;
}
}
pinNum++;
}
needRect = FALSE;
lab->lab_flags &= ~(PORT_USE_MASK | PORT_DIR_MASK |
PORT_CLASS_MASK);