few style cleanings
This commit is contained in:
parent
109e33f127
commit
e14dc3aaa3
|
|
@ -22,7 +22,6 @@ BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue
|
|||
{
|
||||
BJTinstance *here = (BJTinstance*)instPtr;
|
||||
double tmp;
|
||||
int itmp;
|
||||
double vr;
|
||||
double vi;
|
||||
double sr;
|
||||
|
|
@ -232,6 +231,7 @@ BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue
|
|||
return(OK);
|
||||
case BJT_QUEST_SENS_CPLX:
|
||||
if(ckt->CKTsenInfo){
|
||||
int itmp;
|
||||
itmp = select->iValue + 1;
|
||||
value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[itmp]+
|
||||
here->BJTsenParmNo);
|
||||
|
|
|
|||
|
|
@ -521,11 +521,11 @@ next1: vtn=vt*here->BJTtemissionCoeffF;
|
|||
* Kull's Quasi-Saturation model
|
||||
*/
|
||||
if (model->BJTintCollResistGiven) {
|
||||
double Kbci,Kbci_Vbci,Kbcx,Kbcx_Vbcx;
|
||||
double rKp1,rKp1_Vbci,rKp1_Vbcx,xvar1,xvar1_Vbci,xvar1_Vbcx;
|
||||
double Vcorr,Vcorr_Vbci,Vcorr_Vbcx,Iohm,Iohm_Vrci,Iohm_Vbci,Iohm_Vbcx;
|
||||
double quot,quot_Vrci;
|
||||
if (vrci > 0.) {
|
||||
double Kbci,Kbci_Vbci,Kbcx,Kbcx_Vbcx;
|
||||
double rKp1,rKp1_Vbci,rKp1_Vbcx,xvar1,xvar1_Vbci,xvar1_Vbcx;
|
||||
double Vcorr,Vcorr_Vbci,Vcorr_Vbcx,Iohm,Iohm_Vrci,Iohm_Vbci,Iohm_Vbcx;
|
||||
double quot,quot_Vrci;
|
||||
Kbci = sqrt(1+here->BJTtepiDoping*exp(vbc/vt));
|
||||
Kbci_Vbci = here->BJTtepiDoping*exp(vbc/vt)/(2*vt*Kbci);
|
||||
Kbcx = sqrt(1+here->BJTtepiDoping*exp(vbcx/vt));
|
||||
|
|
|
|||
|
|
@ -314,7 +314,6 @@ restore:
|
|||
*(ckt->CKTstate0 + here->BJTstate + i) = *(SaveState0 + i);
|
||||
}
|
||||
*(ckt->CKTstate1 + here->BJTcexbc) = *(SaveState0 + 21);
|
||||
*(ckt->CKTstate1 + here->BJTcexbc) = *(SaveState0 + 21);
|
||||
here->BJTcapbe = *(SaveState0 + 23) ;
|
||||
here->BJTcapbc = *(SaveState0 + 24) ;
|
||||
here->BJTcapsub = *(SaveState0 + 25) ;
|
||||
|
|
|
|||
|
|
@ -3996,14 +3996,7 @@ if (here->B3SOIDDdebugMod > 2)
|
|||
gTtdp = - (gTtg + gTtb + gTte + gTtsp);
|
||||
}
|
||||
|
||||
if (model->B3SOIDDtype > 0)
|
||||
{
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqe = ceqqe;
|
||||
ceqqd = ceqqd;
|
||||
}
|
||||
else
|
||||
if (model->B3SOIDDtype < 0)
|
||||
{
|
||||
ceqbodcon = -ceqbodcon;
|
||||
ceqbody = -ceqbody;
|
||||
|
|
|
|||
|
|
@ -3116,14 +3116,7 @@ if (here->B3SOIFDdebugMod > 2)
|
|||
gTtdp = - (gTtg + gTtb + gTte + gTtsp);
|
||||
}
|
||||
|
||||
if (model->B3SOIFDtype > 0)
|
||||
{
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqe = ceqqe;
|
||||
ceqqd = ceqqd;
|
||||
}
|
||||
else
|
||||
if (model->B3SOIFDtype < 0)
|
||||
{
|
||||
ceqbodcon = -ceqbodcon;
|
||||
ceqbody = -ceqbody;
|
||||
|
|
|
|||
|
|
@ -3977,14 +3977,7 @@ for (; model != NULL; model = B3SOIPDnextModel(model))
|
|||
gTtdp = - (gTtg + gTtb + gTtsp);
|
||||
}
|
||||
|
||||
if (model->B3SOIPDtype > 0)
|
||||
{
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqe = ceqqe;
|
||||
ceqqd = ceqqd;
|
||||
}
|
||||
else
|
||||
if (model->B3SOIPDtype < 0)
|
||||
{
|
||||
ceqbodcon = -ceqbodcon;
|
||||
ceqbody = -ceqbody;
|
||||
|
|
|
|||
|
|
@ -1847,10 +1847,12 @@ line900:
|
|||
if (model->BSIM3v0type > 0)
|
||||
{ ceqbs += (here->BSIM3v0cbs - (here->BSIM3v0gbs - ckt->CKTgmin) * vbs);
|
||||
ceqbd += (here->BSIM3v0cbd - (here->BSIM3v0gbd - ckt->CKTgmin) * vbd);
|
||||
/*
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqd = ceqqd;
|
||||
cqcheq = cqcheq;
|
||||
*/
|
||||
}
|
||||
else
|
||||
{ ceqbs = -ceqbs - (here->BSIM3v0cbs - (here->BSIM3v0gbs
|
||||
|
|
|
|||
|
|
@ -2353,10 +2353,12 @@ line900:
|
|||
if (model->BSIM3v1type > 0)
|
||||
{ ceqbs += (here->BSIM3v1cbs - (here->BSIM3v1gbs - ckt->CKTgmin) * vbs);
|
||||
ceqbd += (here->BSIM3v1cbd - (here->BSIM3v1gbd - ckt->CKTgmin) * vbd);
|
||||
/*
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqd = ceqqd;
|
||||
cqcheq = cqcheq;
|
||||
*/
|
||||
}
|
||||
else
|
||||
{ ceqbs = -ceqbs - (here->BSIM3v1cbs - (here->BSIM3v1gbs
|
||||
|
|
|
|||
|
|
@ -10263,14 +10263,7 @@ line900:
|
|||
= gdtotb = ceqgdtot = 0.0;
|
||||
}
|
||||
|
||||
if (model->B4SOItype > 0)
|
||||
{
|
||||
ceqqg = ceqqg;
|
||||
ceqqb = ceqqb;
|
||||
ceqqe = ceqqe;
|
||||
ceqqd = ceqqd;
|
||||
}
|
||||
else
|
||||
if (model->B4SOItype < 0)
|
||||
{
|
||||
ceqbodcon = -ceqbodcon;
|
||||
ceqbody = -ceqbody;
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ int load_opus(const char *name)
|
|||
add_device(num, devs, 1);
|
||||
|
||||
#ifdef TRACE
|
||||
printf("Got %u devices.\n", num);
|
||||
printf("Got %d devices.\n", num);
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -486,7 +486,7 @@ int load_opus(const char *name)
|
|||
|
||||
add_udn(num, udns);
|
||||
#ifdef TRACE
|
||||
printf("Got %u udns.\n", num);
|
||||
printf("Got %d udns.\n", num);
|
||||
#endif
|
||||
|
||||
/* Give the code model access to facilities provided by ngspice. */
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ INDsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
#ifdef SENSDEBUG
|
||||
fprintf(stdout,"cind = %.5e,icind = %.5e\n",cind,icind);
|
||||
fprintf(stdout,"val = %.5e,ival = %.5e\n",val,ival);
|
||||
fprintf(stdout,"brEq = %.5e,senparmno = %.5e\n",
|
||||
fprintf(stdout,"brEq = %d,senparmno = %d\n",
|
||||
here->INDbrEq,here->INDsenParmNo);
|
||||
#endif /* SENSDEBUG */
|
||||
|
||||
|
|
|
|||
|
|
@ -166,9 +166,6 @@ VDMOSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
|
|||
value->rValue += fabs(*(ckt->CKTstate0 + here->VDMOScqgd) *
|
||||
(*(ckt->CKTrhsOld + here->VDMOSgNode) -
|
||||
*(ckt->CKTrhsOld + here->VDMOSdNode)));
|
||||
}
|
||||
if ((ckt->CKTcurrentAnalysis & DOING_TRAN) &&
|
||||
!(ckt->CKTmode & MODETRANOP)) {
|
||||
value->rValue += fabs(*(ckt->CKTstate0 + here->VDMOScqgs) *
|
||||
(*(ckt->CKTrhsOld + here->VDMOSgNode) -
|
||||
*(ckt->CKTrhsOld + here->VDMOSsNode)));
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ VDMOSconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
delTemp = *(ckt->CKTrhs + here->VDMOStempNode);
|
||||
deldelTemp = delTemp - *(ckt->CKTstate0 + here->VDMOSdelTemp);
|
||||
} else {
|
||||
delTemp = 0.0;
|
||||
deldelTemp = 0.0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -803,7 +803,7 @@ bypass:
|
|||
/*
|
||||
* charge storage elements
|
||||
*/
|
||||
double czero, czof2, diffcharge, deplcharge, diffcap, deplcap;
|
||||
double czero, diffcharge, deplcharge, diffcap, deplcap;
|
||||
czero = here->VDIOtJctCap;
|
||||
if (vd < here->VDIOtDepCap) {
|
||||
arg = 1 - vd / here->VDIOtJctPot;
|
||||
|
|
@ -811,6 +811,7 @@ bypass:
|
|||
deplcharge = here->VDIOtJctPot*czero*(1 - arg*sarg) / (1 - here->VDIOtGradingCoeff);
|
||||
deplcap = czero*sarg;
|
||||
} else {
|
||||
double czof2;
|
||||
czof2 = czero / here->VDIOtF2;
|
||||
deplcharge = czero*here->VDIOtF1 + czof2*(here->VDIOtF3*(vd - here->VDIOtDepCap) +
|
||||
(here->VDIOtGradingCoeff / (here->VDIOtJctPot + here->VDIOtJctPot))*(vd*vd - here->VDIOtDepCap*here->VDIOtDepCap));
|
||||
|
|
|
|||
Loading…
Reference in New Issue