Corrected an apparently long-standing (but relatively obscure) error

where devices extracted as "device resistor" or "device capacitor"
and defining parameters (e.g., area, perimeter) will generate the
device arguments in the wrong order in the .ext file, resulting in
incorrect readback when attempting to do ext2spice, resulting in the
device being omitted from the resulting netlist.
This commit is contained in:
Tim Edwards 2019-01-30 17:16:50 -05:00
parent e87d413475
commit 25304924b7
1 changed files with 19 additions and 7 deletions

View File

@ -2059,12 +2059,9 @@ extOutputDevices(def, transList, outFile)
"Resistor has zero width");
}
extOutputDevParams(reg, t, outFile, length, width);
if (ExtCurStyle->exts_deviceClass[t] == DEV_RSUBCKT)
{
fprintf(outFile, " \"%s\"", (subsName == NULL) ?
"None" : subsName);
/* nothing */
}
else if (hasModel) /* SPICE semiconductor resistor */
{
@ -2074,6 +2071,15 @@ extOutputDevices(def, transList, outFile)
}
else /* regular resistor */
fprintf(outFile, " %g", dres / 1000.0); /* mOhms -> Ohms */
extOutputDevParams(reg, t, outFile, length, width);
if (ExtCurStyle->exts_deviceClass[t] == DEV_RSUBCKT)
{
fprintf(outFile, " \"%s\"", (subsName == NULL) ?
"None" : subsName);
}
break;
case DEV_CAP:
@ -2136,12 +2142,10 @@ extOutputDevices(def, transList, outFile)
arg.fra_each = (int (*)()) NULL;
(void) ExtFindNeighbors(reg->treg_tile, arg.fra_pNum, &arg);
}
extOutputDevParams(reg, t, outFile, length, width);
if (ExtCurStyle->exts_deviceClass[t] == DEV_CSUBCKT)
{
fprintf(outFile, " \"%s\"", (subsName == NULL) ?
"None" : subsName);
/* (Nothing) */
}
else /* SPICE semiconductor resistor */
{
@ -2158,6 +2162,14 @@ extOutputDevices(def, transList, outFile)
if (subsName != NULL)
fprintf(outFile, " \"%s\"", subsName);
}
extOutputDevParams(reg, t, outFile, length, width);
if (ExtCurStyle->exts_deviceClass[t] == DEV_CSUBCKT)
{
fprintf(outFile, " \"%s\"", (subsName == NULL) ?
"None" : subsName);
}
}
else
{