Browse Source

Note: ix: dc value used for op instead of transient time=0 value

Former warning message or note only issued when dc value and
value at transient time=0 differ.
pre-master-46
Holger Vogt 4 years ago
parent
commit
98763c0add
  1. 19
      src/spicelib/devices/isrc/isrctemp.c

19
src/spicelib/devices/isrc/isrctemp.c

@ -41,10 +41,21 @@ ISRCtemp(GENmodel *inModel, CKTcircuit *ckt)
"%s: has no value, DC 0 assumed", "%s: has no value, DC 0 assumed",
here->ISRCname); here->ISRCname);
} }
else if (here->ISRCdcGiven && here->ISRCfuncTGiven) {
SPfrontEnd->IFerrorf(ERR_INFO,
"%s: dc value used for op instead of transient time 0 value.",
here->ISRCname);
else if (here->ISRCdcGiven && here->ISRCfuncTGiven
&& here->ISRCfunctionType != TRNOISE && here->ISRCfunctionType != TRRANDOM) {
/* DC value and transient time 0 values given */
double time0value;
/* determine transient time 0 value */
if (here->ISRCfunctionType == AM || here->ISRCfunctionType == PWL)
time0value = here->ISRCcoeffs[1];
else
time0value = here->ISRCcoeffs[0];
/* No warning issued if DC value and transient time 0 value are the same */
if (!AlmostEqualUlps(time0value, here->ISRCdcValue, 3)) {
SPfrontEnd->IFerrorf(ERR_INFO,
"%s: dc value used for op instead of transient time=0 value.",
here->ISRCname);
}
} }
if(!here->ISRCmGiven) if(!here->ISRCmGiven)
here->ISRCmValue = 1; here->ISRCmValue = 1;

Loading…
Cancel
Save