add supply ramping to nullator offset

This commit is contained in:
Florian Ballenegger 2020-10-18 15:33:33 +02:00
parent 567fa78e96
commit fb93986efe
1 changed files with 11 additions and 2 deletions

View File

@ -34,10 +34,19 @@ NULAload(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the instances of the model */ /* loop through all the instances of the model */
for (here = NULAinstances(model); here != NULL ; for (here = NULAinstances(model); here != NULL ;
here=NULAnextInstance(here)) { here=NULAnextInstance(here)) {
double value;
*(here->NULAibrContPosPtr) += 1.0 ; *(here->NULAibrContPosPtr) += 1.0 ;
*(here->NULAibrContNegPtr) -= 1.0 ; *(here->NULAibrContNegPtr) -= 1.0 ;
*(ckt->CKTrhs + (here->NULAbranch)) += here->NULAoffset; value = here->NULAoffset;
#ifdef XSPICE_EXP
value *= ckt->CKTsrcFact;
value *= cm_analog_ramp_factor();
#else
if (ckt->CKTmode & MODETRANOP)
value *= ckt->CKTsrcFact;
#endif
*(ckt->CKTrhs + (here->NULAbranch)) += value;
} }
} }
return(OK); return(OK);