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;
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
subdone = spcHierWriteSubParam(hc, dev);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
@ -1090,11 +1088,9 @@ spcdevHierVisit(
}
else
{
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
subdone = spcHierWriteSubParam(hc, dev);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -1142,11 +1138,9 @@ spcdevHierVisit(
}
else
{
spcHierWriteValue(hc, dev);
if (esFormat == CDL)
{
spcHierWriteValue(hc, dev);
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;
spcWriteValue(dev, hierName);
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -3071,11 +3069,9 @@ spcdevVisit(
}
else
{
spcWriteValue(dev, hierName);
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)
@ -3119,11 +3115,9 @@ spcdevVisit(
}
else
{
spcWriteValue(dev, hierName);
if (esFormat == CDL)
{
spcWriteValue(dev, hierName);
subdone = spcWriteSubParam(dev, hierName);
}
fprintf(esSpiceF, " %s", EFDevTypes[dev->dev_type]);
if (esScale < 0)