Added code that when running "extract unique" always prefers to

change a non-port label name instead of a port name whenever it
finds one of each with the same text on different nets.
This commit is contained in:
Tim Edwards 2024-05-07 16:20:35 -04:00
parent ca99d0b76a
commit fd2b1eb9ee
2 changed files with 28 additions and 6 deletions

View File

@ -1 +1 @@
8.3.478
8.3.479

View File

@ -154,9 +154,31 @@ extUniqueCell(def, option)
}
if (lastreg != lp && lastreg != &processedLabel)
{
nwarn += extMakeUnique(def, ll, lp, lregList,
LabelList *lltest = NULL;
/* If the last label is a port and this label is not, then
* run extMakeUnique on the port (since extMakeUnique() causes
* all other nodes to be made unique). This preserves the port
* name whenever a port name disagrees with an internal name.
*/
if (!(ll->ll_label->lab_flags & PORT_DIR_MASK))
for (lltest = lastreg->lreg_labels; lltest; lltest = lltest->ll_next)
if (!strcmp(lltest->ll_label->lab_text, text))
if (lltest->ll_label->lab_flags & PORT_DIR_MASK)
break;
if (lltest != NULL)
{
nwarn += extMakeUnique(def, lltest, lastreg, lregList,
&labelHash, option);
HashSetValue(he, (ClientData) &processedLabel);
}
else
{
nwarn += extMakeUnique(def, ll, lp, lregList,
&labelHash, option);
HashSetValue(he, (ClientData) &processedLabel);
}
}
}
}
@ -199,7 +221,7 @@ extMakeUnique(def, ll, lreg, lregList, labelHash, option)
if (option == EXT_UNIQ_ALL)
goto makeUnique;
else if ((option == EXT_UNIQ_NOPORTS || option == EXT_UNIQ_NOTOPPORTS) &&
!(ll->ll_label->lab_flags & PORT_DIR_MASK))
(ll->ll_label->lab_flags & PORT_DIR_MASK))
goto makeUnique;
cpend = strchr(text, '\0');
@ -207,7 +229,7 @@ extMakeUnique(def, ll, lreg, lregList, labelHash, option)
if (*cpend == '#') goto makeUnique;
if (*cpend == '!') return 0;
if (((option == EXT_UNIQ_NOPORTS) || (option == EXT_UNIQ_NOTOPPORTS))
&& (ll->ll_label->lab_flags & PORT_DIR_MASK))
&& !(ll->ll_label->lab_flags & PORT_DIR_MASK))
return 0;
/* Generate a warning for each occurrence of this label */
@ -250,7 +272,7 @@ makeUnique:
{
if (ll2->ll_label == (Label *) NULL)
continue;
if (strcmp(ll2->ll_label->lab_text, name) != 0)
if (strcmp(ll2->ll_label->lab_text, name))
continue;
/*