One more minor change to the behavior just implemented: A value

for a resistor or capacitor is optional but is valid SPICE and not
just limited to CDL format, so it is now allowed to add "r=" at
the end of a resistor or capacitor component (not subcircuit) to
generate the optional component value.
This commit is contained in:
R. Timothy Edwards 2025-10-06 20:37:30 -04:00
parent 8c323803b7
commit 3631892cfa
2 changed files with 6 additions and 18 deletions

View File

@ -559,11 +559,9 @@ esOutputHierResistor(
{
bool subdone = FALSE;
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
subdone = spcHierWriteSubParam(hc, dev);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
@ -1089,12 +1087,10 @@ spcdevHierVisit(
spcHierWriteParams(hc, dev, scale, l, w, sdM, FALSE);
}
else
{
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
subdone = spcHierWriteSubParam(hc, dev);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -1141,12 +1137,10 @@ spcdevHierVisit(
spcHierWriteParams(hc, dev, scale, l, w, sdM, FALSE);
}
else
{
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
subdone = spcHierWriteSubParam(hc, dev);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)

View File

@ -2489,11 +2489,9 @@ esOutputResistor(
else
{
bool subdone = FALSE;
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
if (esFormat == CDL)
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -3070,12 +3068,10 @@ spcdevVisit(
spcWriteParams(dev, hierName, scale, l, w, sdM, FALSE);
}
else
{
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
if (esFormat == CDL)
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -3118,12 +3114,10 @@ spcdevVisit(
spcWriteParams(dev, hierName, scale, l, w, sdM, FALSE);
}
else
{
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
if (esFormat == CDL)
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)