mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-30 01:48:43 +02:00
One more correction to limit, by default, the generation of "equiv"
statements in the .ext file output to those that mark a port as equivalent to the node name used elsewhere in the file. This limits unnecessary output of "equiv" statements that can bog down ext2spice and other commands that use the .ext file contents.
This commit is contained in:
+18
-6
@@ -733,19 +733,31 @@ extOutputNodes(nodeList, outFile)
|
||||
|
||||
for (ll = reg->nreg_labels; ll; ll = ll->ll_next)
|
||||
{
|
||||
bool isPort = (ll->ll_attr == LL_PORTATTR) ? TRUE : FALSE;
|
||||
bool isPort;
|
||||
|
||||
/* Do not export aliases that are not ports unless the */
|
||||
/* "extract do aliases" options was selected. */
|
||||
|
||||
if (!(ExtOptions & EXT_DOALIASES) && (!isPort)) continue;
|
||||
|
||||
if (ll->ll_label->lab_text == text)
|
||||
{
|
||||
isPort = (ll->ll_attr == LL_PORTATTR) ? TRUE : FALSE;
|
||||
|
||||
for (ll = ll->ll_next; ll; ll = ll->ll_next)
|
||||
if (extLabType(ll->ll_label->lab_text, LABTYPE_NAME))
|
||||
if (strcmp(text, ll->ll_label->lab_text))
|
||||
{
|
||||
fprintf(outFile, "equiv \"%s\" \"%s\"\n",
|
||||
if ((ll->ll_attr == LL_PORTATTR) ||
|
||||
(ExtOptions & EXT_DOALIASES))
|
||||
{
|
||||
fprintf(outFile, "equiv \"%s\" \"%s\"\n",
|
||||
text, ll->ll_label->lab_text);
|
||||
if (isPort && (ll->ll_attr == LL_PORTATTR))
|
||||
TxError("Warning: Ports \"%s\" and \"%s\" are"
|
||||
" electrically shorted.\n",
|
||||
text, ll->ll_label->lab_text);
|
||||
if (isPort && (ll->ll_attr == LL_PORTATTR))
|
||||
TxError("Warning: Ports \"%s\" and \"%s\" are"
|
||||
" electrically shorted.\n",
|
||||
text, ll->ll_label->lab_text);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user