Compare commits
No commits in common. "master" and "8.3.584" have entirely different histories.
|
|
@ -603,57 +603,33 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
|
||||||
}
|
}
|
||||||
if (!equalByCase)
|
if (!equalByCase)
|
||||||
{
|
{
|
||||||
/* If one of the nodes has been generated from the
|
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
||||||
* other by "extract unique", then this is a case where
|
|
||||||
* the "extract unique" algorithm is blind to shorts
|
|
||||||
* through subcell hierarchy and has made a name unique
|
|
||||||
* unnecessarily. In that case, merge the node instead
|
|
||||||
* of generating a short.
|
|
||||||
*/
|
|
||||||
char *uniqstr1, *uniqstr2;
|
|
||||||
bool isuniq;
|
|
||||||
|
|
||||||
uniqstr1 = strstr(nodeName1, "_uq");
|
|
||||||
uniqstr2 = strstr(nodeName2, "_uq");
|
|
||||||
if (uniqstr1) *uniqstr1 = '\0';
|
|
||||||
if (uniqstr2) *uniqstr2 = '\0';
|
|
||||||
isuniq = !strcmp(nodeName1, nodeName2);
|
|
||||||
if (uniqstr1) *uniqstr1 = '_';
|
|
||||||
if (uniqstr2) *uniqstr2 = '_';
|
|
||||||
|
|
||||||
if (!isuniq)
|
|
||||||
{
|
{
|
||||||
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
int i;
|
||||||
{
|
int sdev;
|
||||||
int i;
|
char *argv[10], zeroarg[] = "0";
|
||||||
int sdev;
|
|
||||||
char *argv[10], zeroarg[] = "0";
|
|
||||||
|
|
||||||
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
||||||
sdev = DEV_RES;
|
sdev = DEV_RES;
|
||||||
else
|
|
||||||
sdev = DEV_VOLT;
|
|
||||||
|
|
||||||
for (i = 0; i < 10; i++) argv[i] = zeroarg;
|
|
||||||
argv[0] = StrDup((char **)NULL, "0.0");
|
|
||||||
argv[1] = StrDup((char **)NULL, "dummy");
|
|
||||||
argv[4] = StrDup((char **)NULL, nodeName1);
|
|
||||||
argv[7] = StrDup((char **)NULL, nodeName2);
|
|
||||||
efBuildDevice(def, sdev, "None", &GeoNullRect, 10, argv);
|
|
||||||
freeMagic(argv[0]);
|
|
||||||
freeMagic(argv[1]);
|
|
||||||
freeMagic(argv[4]);
|
|
||||||
freeMagic(argv[7]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (!resist)
|
|
||||||
TxError("Warning: Ports \"%s\" and \"%s\" are electrically "
|
|
||||||
"shorted.\n", nodeName1, nodeName2);
|
|
||||||
else
|
else
|
||||||
/* Do not merge the nodes when folding in extresist parasitics */
|
sdev = DEV_VOLT;
|
||||||
return;
|
|
||||||
|
for (i = 0; i < 10; i++) argv[i] = zeroarg;
|
||||||
|
argv[0] = StrDup((char **)NULL, "0.0");
|
||||||
|
argv[1] = StrDup((char **)NULL, "dummy");
|
||||||
|
argv[4] = StrDup((char **)NULL, nodeName1);
|
||||||
|
argv[7] = StrDup((char **)NULL, nodeName2);
|
||||||
|
efBuildDevice(def, sdev, "None", &GeoNullRect, 10, argv);
|
||||||
|
freeMagic(argv[0]);
|
||||||
|
freeMagic(argv[1]);
|
||||||
|
freeMagic(argv[4]);
|
||||||
|
freeMagic(argv[7]);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (resist)
|
else if (!resist)
|
||||||
|
TxError("Warning: Ports \"%s\" and \"%s\" are electrically shorted.\n",
|
||||||
|
nodeName1, nodeName2);
|
||||||
|
else
|
||||||
/* Do not merge the nodes when folding in extresist parasitics */
|
/* Do not merge the nodes when folding in extresist parasitics */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -676,6 +652,8 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
|
||||||
if (efWarn)
|
if (efWarn)
|
||||||
efReadError("Merged nodes %s and %s\n", nodeName1, nodeName2);
|
efReadError("Merged nodes %s and %s\n", nodeName1, nodeName2);
|
||||||
lostnode = efNodeMerge(&nn1->efnn_node, &nn2->efnn_node);
|
lostnode = efNodeMerge(&nn1->efnn_node, &nn2->efnn_node);
|
||||||
|
if (nn1->efnn_port > 0) nn2->efnn_port = nn1->efnn_port;
|
||||||
|
else if (nn2->efnn_port > 0) nn1->efnn_port = nn2->efnn_port;
|
||||||
|
|
||||||
/* Check if there are any device terminals pointing to the
|
/* Check if there are any device terminals pointing to the
|
||||||
* node that was just removed.
|
* node that was just removed.
|
||||||
|
|
@ -1568,25 +1546,7 @@ efBuildConnect(def, nodeName1, nodeName2, deltaC, av, ac)
|
||||||
unsigned size = sizeof (Connection)
|
unsigned size = sizeof (Connection)
|
||||||
+ (efNumResistClasses - 1) * sizeof (EFPerimArea);
|
+ (efNumResistClasses - 1) * sizeof (EFPerimArea);
|
||||||
|
|
||||||
/* If one of the nodes has been generated from the
|
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
||||||
* other by "extract unique", then this is a case where
|
|
||||||
* the "extract unique" algorithm is blind to shorts
|
|
||||||
* through subcell hierarchy and has made a name unique
|
|
||||||
* unnecessarily. In that case, merge the node instead
|
|
||||||
* of generating a short.
|
|
||||||
*/
|
|
||||||
char *uniqstr1, *uniqstr2;
|
|
||||||
bool isuniq;
|
|
||||||
|
|
||||||
uniqstr1 = strstr(nodeName1, "_uq");
|
|
||||||
uniqstr2 = strstr(nodeName2, "_uq");
|
|
||||||
if (uniqstr1) *uniqstr1 = '\0';
|
|
||||||
if (uniqstr2) *uniqstr2 = '\0';
|
|
||||||
isuniq = !strcmp(nodeName1, nodeName2);
|
|
||||||
if (uniqstr1) *uniqstr1 = '_';
|
|
||||||
if (uniqstr2) *uniqstr2 = '_';
|
|
||||||
|
|
||||||
if (!isuniq && ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE))
|
|
||||||
{
|
{
|
||||||
/* Handle the case where two ports on different nets get merged.
|
/* Handle the case where two ports on different nets get merged.
|
||||||
* If "extract short resistor" or "extract short voltage" has
|
* If "extract short resistor" or "extract short voltage" has
|
||||||
|
|
@ -1989,10 +1949,8 @@ efNodeMerge(node1ptr, node2ptr)
|
||||||
if (*node1ptr == *node2ptr)
|
if (*node1ptr == *node2ptr)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
/*
|
/* Keep the node with the greater number of entries, and merge */
|
||||||
* Keep the node with the greater number of entries, and merge
|
/* the node with fewer entries into it. */
|
||||||
* the node with fewer entries into it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ((*node1ptr)->efnode_num >= (*node2ptr)->efnode_num)
|
if ((*node1ptr)->efnode_num >= (*node2ptr)->efnode_num)
|
||||||
{
|
{
|
||||||
|
|
@ -2032,7 +1990,7 @@ efNodeMerge(node1ptr, node2ptr)
|
||||||
/* Make all EFNodeNames point to "keeping" */
|
/* Make all EFNodeNames point to "keeping" */
|
||||||
if (removing->efnode_name)
|
if (removing->efnode_name)
|
||||||
{
|
{
|
||||||
bool topportk, topportr, bestname;
|
bool topportk, topportr;
|
||||||
|
|
||||||
for (nn = removing->efnode_name; nn; nn = nn->efnn_next)
|
for (nn = removing->efnode_name; nn; nn = nn->efnn_next)
|
||||||
{
|
{
|
||||||
|
|
@ -2044,9 +2002,9 @@ efNodeMerge(node1ptr, node2ptr)
|
||||||
topportr = (removing->efnode_flags & EF_TOP_PORT) ? TRUE : FALSE;
|
topportr = (removing->efnode_flags & EF_TOP_PORT) ? TRUE : FALSE;
|
||||||
|
|
||||||
/* Concatenate list of EFNodeNames, taking into account precedence */
|
/* Concatenate list of EFNodeNames, taking into account precedence */
|
||||||
if ((!keeping->efnode_name) || (!topportk && topportr)
|
if ((!keeping->efnode_name) || (!topportk && (topportr
|
||||||
|| EFHNBest(removing->efnode_name->efnn_hier,
|
|| EFHNBest(removing->efnode_name->efnn_hier,
|
||||||
keeping->efnode_name->efnn_hier))
|
keeping->efnode_name->efnn_hier))))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* New official name is that of "removing".
|
* New official name is that of "removing".
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue