Corrected the ext2sim output and extresist to properly handle

2-terminal devices without complaining.  The previous handling
seemed to be technically correct other than spitting out warnings
about missing terminals.
This commit is contained in:
Tim Edwards
2023-02-24 12:58:46 -05:00
parent 7b485efa9b
commit e72f85fd10
3 changed files with 32 additions and 15 deletions
+20 -14
View File
@@ -1169,22 +1169,28 @@ simdevVisit(dev, hc, scale, trans)
}
}
if (is_subckt && subnode)
if (dev->dev_class != DEV_DIODE && dev->dev_class != DEV_NDIODE &&
dev->dev_class != DEV_PDIODE)
{
/* As a general policy on subcircuits supporting extresist, */
/* output the subcircuit node as the last port of the */
/* subcircuit definition. */
putc(' ', esSimF);
simdevSubstrate(hierName, subnode->efnode_name->efnn_hier,
dev->dev_type, 0.0, FALSE, esSimF);
}
if (is_subckt && subnode)
{
/* As a general policy on subcircuits supporting extresist, */
/* output the subcircuit node as the last port of the */
/* subcircuit definition, *except* for the use of the 'x' */
/* device type for diodes. */
/* Support gemini's substrate comparison */
else if (esFormat == LBL && subnode)
{
putc(' ', esSimF);
simdevSubstrate(hierName, subnode->efnode_name->efnn_hier,
putc(' ', esSimF);
simdevSubstrate(hierName, subnode->efnode_name->efnn_hier,
dev->dev_type, 0.0, FALSE, esSimF);
}
/* Support gemini's substrate comparison */
else if (esFormat == LBL && subnode)
{
putc(' ', esSimF);
simdevSubstrate(hierName, subnode->efnode_name->efnn_hier,
dev->dev_type, 0.0, FALSE, esSimF);
}
}
GeoTransRect(trans, &dev->dev_rect, &r);
@@ -1228,7 +1234,7 @@ simdevVisit(dev, hc, scale, trans)
/* Output source and drain attributes */
if (source->dterm_attrs)
fprintf(esSimF, " s=%s", source->dterm_attrs);
if (drain->dterm_attrs)
if ((source != drain) && drain->dterm_attrs)
fprintf(esSimF, " d=%s", drain->dterm_attrs);
/* Output length, width, and position as attributes */