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:
parent
ca99d0b76a
commit
fd2b1eb9ee
|
|
@ -154,9 +154,31 @@ extUniqueCell(def, option)
|
||||||
}
|
}
|
||||||
if (lastreg != lp && lastreg != &processedLabel)
|
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);
|
&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)
|
if (option == EXT_UNIQ_ALL)
|
||||||
goto makeUnique;
|
goto makeUnique;
|
||||||
else if ((option == EXT_UNIQ_NOPORTS || option == EXT_UNIQ_NOTOPPORTS) &&
|
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;
|
goto makeUnique;
|
||||||
|
|
||||||
cpend = strchr(text, '\0');
|
cpend = strchr(text, '\0');
|
||||||
|
|
@ -207,7 +229,7 @@ extMakeUnique(def, ll, lreg, lregList, labelHash, option)
|
||||||
if (*cpend == '#') goto makeUnique;
|
if (*cpend == '#') goto makeUnique;
|
||||||
if (*cpend == '!') return 0;
|
if (*cpend == '!') return 0;
|
||||||
if (((option == EXT_UNIQ_NOPORTS) || (option == EXT_UNIQ_NOTOPPORTS))
|
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;
|
return 0;
|
||||||
|
|
||||||
/* Generate a warning for each occurrence of this label */
|
/* Generate a warning for each occurrence of this label */
|
||||||
|
|
@ -250,7 +272,7 @@ makeUnique:
|
||||||
{
|
{
|
||||||
if (ll2->ll_label == (Label *) NULL)
|
if (ll2->ll_label == (Label *) NULL)
|
||||||
continue;
|
continue;
|
||||||
if (strcmp(ll2->ll_label->lab_text, name) != 0)
|
if (strcmp(ll2->ll_label->lab_text, name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue