Made a few corrections that stem from the change to add a separate
record to the label structure to hold the port number. One major issue stemming from this was reported in github issue #203 by Anton Blanchard. This commit fixes that error.
This commit is contained in:
parent
ea414c822d
commit
716848067e
|
|
@ -480,6 +480,7 @@ DBUndoPutLabel(cellDef, lab)
|
||||||
lup->lue_just = lab->lab_just;
|
lup->lue_just = lab->lab_just;
|
||||||
lup->lue_type = lab->lab_type;
|
lup->lue_type = lab->lab_type;
|
||||||
lup->lue_flags = lab->lab_flags;
|
lup->lue_flags = lab->lab_flags;
|
||||||
|
lup->lue_port = lab->lab_port;
|
||||||
lup->lue_font = lab->lab_font;
|
lup->lue_font = lab->lab_font;
|
||||||
lup->lue_size = lab->lab_size;
|
lup->lue_size = lab->lab_size;
|
||||||
lup->lue_rotate = lab->lab_rotate;
|
lup->lue_rotate = lab->lab_rotate;
|
||||||
|
|
@ -523,6 +524,7 @@ DBUndoEraseLabel(cellDef, lab)
|
||||||
lup->lue_just = lab->lab_just;
|
lup->lue_just = lab->lab_just;
|
||||||
lup->lue_type = lab->lab_type;
|
lup->lue_type = lab->lab_type;
|
||||||
lup->lue_flags = lab->lab_flags;
|
lup->lue_flags = lab->lab_flags;
|
||||||
|
lup->lue_port = lab->lab_port;
|
||||||
lup->lue_font = lab->lab_font;
|
lup->lue_font = lab->lab_font;
|
||||||
lup->lue_size = lab->lab_size;
|
lup->lue_size = lab->lab_size;
|
||||||
lup->lue_rotate = lab->lab_rotate;
|
lup->lue_rotate = lab->lab_rotate;
|
||||||
|
|
|
||||||
|
|
@ -341,6 +341,7 @@ extHardSetLabel(scx, reg, arg)
|
||||||
GeoTransRect(&scx->scx_trans, &r, &newlab->lab_rect);
|
GeoTransRect(&scx->scx_trans, &r, &newlab->lab_rect);
|
||||||
newlab->lab_type = oldlab->lab_type;
|
newlab->lab_type = oldlab->lab_type;
|
||||||
newlab->lab_flags = oldlab->lab_flags;
|
newlab->lab_flags = oldlab->lab_flags;
|
||||||
|
newlab->lab_port = oldlab->lab_port;
|
||||||
text = oldlab->lab_text;
|
text = oldlab->lab_text;
|
||||||
|
|
||||||
/* Don't care, really, which orientation the label has */
|
/* Don't care, really, which orientation the label has */
|
||||||
|
|
@ -423,6 +424,7 @@ extHardGenerateLabel(scx, reg, arg)
|
||||||
|
|
||||||
/* Mark this as a generated label; may or may not be useful */
|
/* Mark this as a generated label; may or may not be useful */
|
||||||
newlab->lab_flags = LABEL_GENERATE;
|
newlab->lab_flags = LABEL_GENERATE;
|
||||||
|
newlab->lab_port = 0;
|
||||||
|
|
||||||
/* Construct the text of the new label */
|
/* Construct the text of the new label */
|
||||||
dstp = newlab->lab_text;
|
dstp = newlab->lab_text;
|
||||||
|
|
|
||||||
|
|
@ -793,6 +793,7 @@ extSubtreeFunc(scx, ha)
|
||||||
newlab->lab_type = lab->lab_type;
|
newlab->lab_type = lab->lab_type;
|
||||||
newlab->lab_rect = lab->lab_rect;
|
newlab->lab_rect = lab->lab_rect;
|
||||||
newlab->lab_flags = lab->lab_flags;
|
newlab->lab_flags = lab->lab_flags;
|
||||||
|
newlab->lab_port = lab->lab_port;
|
||||||
strcpy(newlab->lab_text, lab->lab_text);
|
strcpy(newlab->lab_text, lab->lab_text);
|
||||||
|
|
||||||
newlab->lab_next = cumUse->cu_def->cd_labels;
|
newlab->lab_next = cumUse->cu_def->cd_labels;
|
||||||
|
|
|
||||||
|
|
@ -1331,10 +1331,13 @@ LefReadPort(lefMacro, f, pinName, pinNum, pinDir, pinUse, pinShape, oscale, lann
|
||||||
if (strcmp(newlab->lab_text, pinName))
|
if (strcmp(newlab->lab_text, pinName))
|
||||||
LefError(LEF_ERROR, "Internal error: Can't find the label!\n");
|
LefError(LEF_ERROR, "Internal error: Can't find the label!\n");
|
||||||
else
|
else
|
||||||
|
{
|
||||||
/* Make this a port, and make it a sticky label so that */
|
/* Make this a port, and make it a sticky label so that */
|
||||||
/* it is guaranteed to be on the layer on which it is defined */
|
/* it is guaranteed to be on the layer on which it is defined */
|
||||||
newlab->lab_flags = pinNum | pinUse | pinDir | pinShape |
|
newlab->lab_flags = pinUse | pinDir | pinShape |
|
||||||
PORT_DIR_MASK | LABEL_STICKY;
|
PORT_DIR_MASK | LABEL_STICKY;
|
||||||
|
newlab->lab_port = pinNum;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* If lanno is non-NULL then the first rectangle in the LEF */
|
/* If lanno is non-NULL then the first rectangle in the LEF */
|
||||||
/* port list is used to modify it. All other LEF port geometry */
|
/* port list is used to modify it. All other LEF port geometry */
|
||||||
|
|
@ -1628,8 +1631,9 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
|
||||||
needRect = FALSE;
|
needRect = FALSE;
|
||||||
lab->lab_flags &= ~(PORT_USE_MASK | PORT_DIR_MASK |
|
lab->lab_flags &= ~(PORT_USE_MASK | PORT_DIR_MASK |
|
||||||
PORT_CLASS_MASK | PORT_SHAPE_MASK);
|
PORT_CLASS_MASK | PORT_SHAPE_MASK);
|
||||||
lab->lab_flags |= pinNum | pinUse | pinDir | pinShape |
|
lab->lab_flags |= pinUse | pinDir | pinShape |
|
||||||
PORT_DIR_MASK;
|
PORT_DIR_MASK;
|
||||||
|
lab->lab_port = pinNum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue