devices/res/restemp.c, RESupdate_conduct(), avoid excess warnings
This function is invoked several times during initialisation, possibly with yet incomplete model and instance parameter settings. And it might be invoked many times during dc sweep.
This commit is contained in:
parent
cffab98882
commit
abb07c4306
|
|
@ -281,7 +281,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
} else if (job->TRCVvType[i] == rcode) {
|
||||
((RESinstance *)(job->TRCVvElt[i]))->RESresist =
|
||||
job->TRCVvStart[i];
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]));
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), FALSE);
|
||||
DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
}
|
||||
|
||||
|
|
@ -461,7 +461,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
} else if (job->TRCVvType[i] == rcode) { /* resistance */
|
||||
((RESinstance*)(job->TRCVvElt[i]))->RESresist +=
|
||||
job->TRCVvStep[i];
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]));
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), FALSE);
|
||||
DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
} else if (job->TRCVvType[i] == TEMP_CODE) { /* temperature */
|
||||
ckt->CKTtemp += job->TRCVvStep[i];
|
||||
|
|
@ -496,7 +496,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
} else if (job->TRCVvType[i] == rcode) { /* Resistance */
|
||||
((RESinstance*)(job->TRCVvElt[i]))->RESresist = job->TRCVvSave[i];
|
||||
((RESinstance*)(job->TRCVvElt[i]))->RESresGiven = (job->TRCVgSave[i] != 0);
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]));
|
||||
RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), TRUE);
|
||||
DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
} else if (job->TRCVvType[i] == TEMP_CODE) {
|
||||
ckt->CKTtemp = job->TRCVvSave[i];
|
||||
|
|
|
|||
|
|
@ -187,6 +187,6 @@ typedef struct sRESmodel { /* model structure for a resistor */
|
|||
|
||||
#include "resext.h"
|
||||
|
||||
extern void RESupdate_conduct(RESinstance *);
|
||||
extern void RESupdate_conduct(RESinstance *, bool spill_warnings);
|
||||
|
||||
#endif /*RES*/
|
||||
|
|
|
|||
|
|
@ -85,6 +85,6 @@ RESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
|
|||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
RESupdate_conduct(here);
|
||||
RESupdate_conduct(here, FALSE);
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
printf("%s: Instance temperature specified, dtemp ignored\n", here->RESname);
|
||||
}
|
||||
|
||||
RESupdate_conduct(here);
|
||||
RESupdate_conduct(here, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
void
|
||||
RESupdate_conduct(RESinstance *here)
|
||||
RESupdate_conduct(RESinstance *here, bool spill_warnings)
|
||||
{
|
||||
RESmodel *model = here->RESmodPtr;
|
||||
double factor;
|
||||
|
|
@ -67,8 +67,9 @@ RESupdate_conduct(RESinstance *here)
|
|||
} else if (model->RESresGiven) {
|
||||
here->RESresist = model->RESres;
|
||||
} else {
|
||||
SPfrontEnd->IFerrorf (ERR_WARNING,
|
||||
"%s: resistance to low, set to 1 mOhm", here->RESname);
|
||||
if (spill_warnings)
|
||||
SPfrontEnd->IFerrorf (ERR_WARNING,
|
||||
"%s: resistance to low, set to 1 mOhm", here->RESname);
|
||||
here->RESresist = 1e-03;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue