GENmodel, GENinstance, change layout, #1/4, coccinelle semantic patch
This commit is contained in:
parent
4748c92de9
commit
2dcb79d09c
|
|
@ -89,9 +89,9 @@ CKTdisto (CKTcircuit *ckt, int mode)
|
|||
VSRCinstance *here;
|
||||
VSRCmodel *model;
|
||||
for(model = (VSRCmodel *)ckt->CKThead[vcode];model != NULL;
|
||||
model=model->VSRCnextModel){
|
||||
for(here=model->VSRCinstances;here!=NULL;
|
||||
here=here->VSRCnextInstance) {
|
||||
model=VSRCnextModel(model)){
|
||||
for(here=VSRCinstances(model);here!=NULL;
|
||||
here=VSRCnextInstance(here)) {
|
||||
|
||||
/* check if the source has a distortion input*/
|
||||
|
||||
|
|
@ -125,9 +125,9 @@ if (((here->VSRCdF1given) && (mode == D_RHSF1)) ||
|
|||
ISRCmodel *model;
|
||||
|
||||
for(model= (ISRCmodel *)ckt->CKThead[icode];model != NULL;
|
||||
model=model->ISRCnextModel){
|
||||
for(here=model->ISRCinstances;here!=NULL;
|
||||
here=here->ISRCnextInstance) {
|
||||
model=ISRCnextModel(model)){
|
||||
for(here=ISRCinstances(model);here!=NULL;
|
||||
here=ISRCnextInstance(here)) {
|
||||
|
||||
/* check if the source has a distortion input*/
|
||||
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
RESinstance *here;
|
||||
RESmodel *model;
|
||||
|
||||
for (model = (RESmodel *)ckt->CKThead[rcode]; model; model = model->RESnextModel)
|
||||
for (here = model->RESinstances; here; here = here->RESnextInstance)
|
||||
for (model = (RESmodel *)ckt->CKThead[rcode]; model; model = RESnextModel(model))
|
||||
for (here = RESinstances(model); here; here = RESnextInstance(here))
|
||||
if (here->RESname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->RESresist;
|
||||
|
|
@ -109,8 +109,8 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
VSRCinstance *here;
|
||||
VSRCmodel *model;
|
||||
|
||||
for (model = (VSRCmodel *)ckt->CKThead[vcode]; model; model = model->VSRCnextModel)
|
||||
for (here = model->VSRCinstances; here; here = here->VSRCnextInstance)
|
||||
for (model = (VSRCmodel *)ckt->CKThead[vcode]; model; model = VSRCnextModel(model))
|
||||
for (here = VSRCinstances(model); here; here = VSRCnextInstance(here))
|
||||
if (here->VSRCname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->VSRCdcValue;
|
||||
|
|
@ -127,8 +127,8 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
ISRCinstance *here;
|
||||
ISRCmodel *model;
|
||||
|
||||
for (model = (ISRCmodel *)ckt->CKThead[icode]; model; model = model->ISRCnextModel)
|
||||
for (here = model->ISRCinstances; here; here = here->ISRCnextInstance)
|
||||
for (model = (ISRCmodel *)ckt->CKThead[icode]; model; model = ISRCnextModel(model))
|
||||
for (here = ISRCinstances(model); here; here = ISRCnextInstance(here))
|
||||
if (here->ISRCname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->ISRCdcValue;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double tol;
|
||||
double rhs;
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
i = here->ASRCtree->numVars;
|
||||
if (asrc_nvals < i) {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ ASRCfindBr(CKTcircuit *ckt, GENmodel *inputModel, IFuid name)
|
|||
int error;
|
||||
CKTnode *tmp;
|
||||
|
||||
for (; model; model = model->ASRCnextModel)
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance)
|
||||
for (; model; model = ASRCnextModel(model))
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here))
|
||||
if (here->ASRCname == name) {
|
||||
if (here->ASRCbranch == 0) {
|
||||
error = CKTmkCur(ckt, &tmp, here->ASRCname, "branch");
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double difference;
|
||||
double factor;
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here=here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here=ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
NG_IGNORE(s);
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
NG_IGNORE(states);
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here=here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here=ASRCnextInstance(here)) {
|
||||
|
||||
if (!here->ASRCtree)
|
||||
return E_PARMVAL;
|
||||
|
|
@ -126,8 +126,8 @@ ASRCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ASRCmodel *model = (ASRCmodel *) inModel;
|
||||
ASRCinstance *here;
|
||||
|
||||
for (; model; model = model->ASRCnextModel)
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model))
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
if (here->ASRCbranch > 0)
|
||||
CKTdltNNum(ckt, here->ASRCbranch);
|
||||
here->ASRCbranch = 0;
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ASRCmodel *model = (ASRCmodel *) inModel;
|
||||
ASRCinstance *here;
|
||||
|
||||
for (; model; model = model->ASRCnextModel) {
|
||||
for (here = model->ASRCinstances; here; here = here->ASRCnextInstance) {
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
/* Default Value Processing for Source Instance */
|
||||
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ BJTacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double xcmcb;
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for( here = model->BJTinstances; here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = BJTnextInstance(here)) {
|
||||
|
||||
m = here->BJTm;
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue
|
|||
return(OK);
|
||||
case BJT_QUEST_CB:
|
||||
value->rValue = *(ckt->CKTstate0 + here->BJTcb);
|
||||
if (here->BJTmodPtr->BJTsubs==LATERAL) {
|
||||
if (BJTmodPtr(here)->BJTsubs==LATERAL) {
|
||||
value->rValue -= *(ckt->CKTstate0 + here->BJTcdsub);
|
||||
if ((ckt->CKTcurrentAnalysis & DOING_TRAN) &&
|
||||
!(ckt->CKTmode & MODETRANOP)) {
|
||||
|
|
@ -248,7 +248,7 @@ BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue
|
|||
(ckt->CKTmode & MODETRANOP)) {
|
||||
value->rValue = 0;
|
||||
} else {
|
||||
value->rValue = -(here->BJTmodPtr->BJTsubs *
|
||||
value->rValue = -(BJTmodPtr(here)->BJTsubs *
|
||||
(*(ckt->CKTstate0 + here->BJTcqsub) +
|
||||
*(ckt->CKTstate0 + here->BJTcdsub)));
|
||||
}
|
||||
|
|
@ -263,7 +263,7 @@ BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue
|
|||
} else {
|
||||
value->rValue = -*(ckt->CKTstate0 + here->BJTcc);
|
||||
value->rValue -= *(ckt->CKTstate0 + here->BJTcb);
|
||||
if (here->BJTmodPtr->BJTsubs==VERTICAL) {
|
||||
if (BJTmodPtr(here)->BJTsubs==VERTICAL) {
|
||||
value->rValue += *(ckt->CKTstate0 + here->BJTcdsub);
|
||||
if ((ckt->CKTcurrentAnalysis & DOING_TRAN) &&
|
||||
!(ckt->CKTmode & MODETRANOP)) {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ BJTconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for(here=model->BJTinstances;here!=NULL;here = here->BJTnextInstance){
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for(here=BJTinstances(model);here!=NULL;here = BJTnextInstance(here)){
|
||||
|
||||
vbe=model->BJTtype*(
|
||||
*(ckt->CKTrhsOld+here->BJTbasePrimeNode)-
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ BJTdisto(int mode, GENmodel *genmodel, CKTcircuit *ckt)
|
|||
(mode == D_2F1MF2)) {
|
||||
|
||||
/* loop through all the BJT models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
td = model->BJTexcessPhaseFactor;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
/* getting Volterra kernels */
|
||||
/* until further notice x = vbe, y = vbc, z= vbed */
|
||||
|
|
|
|||
|
|
@ -141,11 +141,11 @@ int BJTdSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
vt = here->BJTtemp * CONSTKoverQ;
|
||||
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ BJTgetic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
* external nodes to get values
|
||||
*/
|
||||
|
||||
for( ; model ; model = model->BJTnextModel) {
|
||||
for(here = model->BJTinstances; here ; here = here->BJTnextInstance) {
|
||||
for( ; model ; model = BJTnextModel(model)) {
|
||||
for(here = BJTinstances(model); here ; here = BJTnextInstance(here)) {
|
||||
|
||||
if(!here->BJTicVBEGiven) {
|
||||
here->BJTicVBE =
|
||||
|
|
|
|||
|
|
@ -139,11 +139,11 @@ BJTload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m;
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
vt = here->BJTtemp * CONSTKoverQ;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ BJTnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (model=firstModel; model != NULL; model=model->BJTnextModel) {
|
||||
for (inst=model->BJTinstances; inst != NULL;
|
||||
inst=inst->BJTnextInstance) {
|
||||
for (model=firstModel; model != NULL; model=BJTnextModel(model)) {
|
||||
for (inst=BJTinstances(model); inst != NULL;
|
||||
inst=BJTnextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ BJTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
double xcmcb;
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for( here = model->BJTinstances; here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = BJTnextInstance(here)) {
|
||||
|
||||
m = here->BJTm;
|
||||
|
||||
|
|
|
|||
|
|
@ -92,11 +92,11 @@ BJTsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
info->SENstatus = PERTURBATION;
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
|
||||
/* save the unperturbed values in the state vector */
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
CKTnode *tmp;
|
||||
|
||||
/* loop through all the diode models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
if(model->BJTtype != NPN && model->BJTtype != PNP) {
|
||||
model->BJTtype = NPN;
|
||||
|
|
@ -345,8 +345,8 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
*/
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
|
|
@ -476,10 +476,10 @@ BJTunsetup(
|
|||
BJTinstance *here;
|
||||
|
||||
for (model = (BJTmodel *)inModel; model != NULL;
|
||||
model = model->BJTnextModel)
|
||||
model = BJTnextModel(model))
|
||||
{
|
||||
for (here = model->BJTinstances; here != NULL;
|
||||
here=here->BJTnextInstance)
|
||||
for (here = BJTinstances(model); here != NULL;
|
||||
here=BJTnextInstance(here))
|
||||
{
|
||||
if (here->BJTemitPrimeNode > 0
|
||||
&& here->BJTemitPrimeNode != here->BJTemitNode)
|
||||
|
|
|
|||
|
|
@ -86,11 +86,11 @@ BJTsLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
info->SENstatus = PERTURBATION;
|
||||
|
||||
/* loop through all the models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
printf("base = %d , baseprm = %d ,col = %d, colprm = %d\n",
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ BJTsoaCheck(CKTcircuit *ckt, GENmodel *inModel)
|
|||
|
||||
maxwarns = ckt->CKTsoaMaxWarns;
|
||||
|
||||
for (; model; model = model->BJTnextModel) {
|
||||
for (; model; model = BJTnextModel(model)) {
|
||||
|
||||
for (here = model->BJTinstances; here; here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here; here=BJTnextInstance(here)) {
|
||||
|
||||
vbe = fabs(ckt->CKTrhsOld [here->BJTbasePrimeNode] -
|
||||
ckt->CKTrhsOld [here->BJTemitPrimeNode]);
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ BJTsPrint(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
printf("BJTS-----------------\n");
|
||||
/* loop through all the BJT models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
printf("Model name:%s\n",model->BJTmodName);
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
ckt->CKTsenInfo->SEN_parmVal[here->BJTsenParmNo] = here->BJTarea;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,12 @@ BJTsSetup(SENstruct *info, GENmodel *inModel)
|
|||
#endif /* STEPDEBUG */
|
||||
|
||||
/* loop through all the diode models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
if(here->BJTsenParmNo){
|
||||
here->BJTsenParmNo = ++(info->SENparms);
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ BJTsUpdate(GENmodel *inModel, CKTcircuit *ckt)
|
|||
printf("CKTtime = %.5e\n",ckt->CKTtime);
|
||||
#endif /* SENSDEBUG */
|
||||
/* loop through all the BJT models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
sxpbe = 0;
|
||||
sxpbc = 0;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double dt;
|
||||
|
||||
/* loop through all the bipolar models */
|
||||
for( ; model != NULL; model = model->BJTnextModel ) {
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
|
||||
if(!model->BJTtnomGiven) model->BJTtnom = ckt->CKTnomTemp;
|
||||
vtnom = CONSTKoverQ * model->BJTtnom;
|
||||
|
|
@ -100,8 +100,8 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
(1 + model->BJTjunctionExpBC);
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
double arg1, pbfact1, egfet1;
|
||||
if(!here->BJTdtempGiven)
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ BJTtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
BJTmodel *model = (BJTmodel*)inModel;
|
||||
BJTinstance *here;
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for(here=model->BJTinstances;here!=NULL;here = here->BJTnextInstance){
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for(here=BJTinstances(model);here!=NULL;here = BJTnextInstance(here)){
|
||||
|
||||
CKTterr(here->BJTqbe,ckt,timeStep);
|
||||
CKTterr(here->BJTqbc,ckt,timeStep);
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ B1acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m; /* parallel multiplier */
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = model->B1nextModel) {
|
||||
for(here = model->B1instances; here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = B1nextInstance(here)) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ B1convTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
/* loop through all the B1 device models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
vbs = model->B1type * (
|
||||
*(ckt->CKTrhsOld+here->B1bNode) -
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ if ((mode == D_TWOF1) || (mode == D_THRF1) ||
|
|||
(mode == D_2F1MF2)) {
|
||||
|
||||
/* loop through all the B1 models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
/* loading starts here */
|
||||
|
||||
|
|
|
|||
|
|
@ -125,11 +125,11 @@ B1dSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
/* loop through all the B1 device models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B1m * here->B1drainArea;
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ B1getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
* external nodes to get values
|
||||
*/
|
||||
|
||||
for( ; model ; model = model->B1nextModel) {
|
||||
for(here = model->B1instances; here ; here = here->B1nextInstance) {
|
||||
for( ; model ; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here ; here = B1nextInstance(here)) {
|
||||
|
||||
if(!here->B1icVBSGiven) {
|
||||
here->B1icVBS =
|
||||
|
|
|
|||
|
|
@ -129,11 +129,11 @@ B1load(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m; /* parallel multiplier */
|
||||
|
||||
/* loop through all the B1 device models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B1drainArea;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ B1noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (model=firstModel; model != NULL; model=model->B1nextModel) {
|
||||
for (inst=model->B1instances; inst != NULL; inst=inst->B1nextInstance) {
|
||||
for (model=firstModel; model != NULL; model=B1nextModel(model)) {
|
||||
for (inst=B1instances(model); inst != NULL; inst=B1nextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ B1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->B1nextModel) {
|
||||
for(here = model->B1instances; here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = B1nextInstance(here)) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
|||
CKTnode *tmp;
|
||||
|
||||
/* loop through all the B1 device models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* Default value Processing for B1 MOSFET Models */
|
||||
if( ! model->B1typeGiven) {
|
||||
|
|
@ -270,8 +270,8 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
|||
}
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
|
@ -407,10 +407,10 @@ B1unsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B1instance *here;
|
||||
|
||||
for (model = (B1model *)inModel; model != NULL;
|
||||
model = model->B1nextModel)
|
||||
model = B1nextModel(model))
|
||||
{
|
||||
for (here = model->B1instances; here != NULL;
|
||||
here=here->B1nextInstance)
|
||||
for (here = B1instances(model); here != NULL;
|
||||
here=B1nextInstance(here))
|
||||
{
|
||||
if (here->B1sNodePrime > 0
|
||||
&& here->B1sNodePrime != here->B1sNode)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ B1temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
NG_IGNORE(ckt);
|
||||
|
||||
/* loop through all the B1 device models */
|
||||
for( ; model != NULL; model = model->B1nextModel ) {
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
|
||||
/* Default value Processing for B1 MOSFET Models */
|
||||
/* Some Limiting for Model Parameters */
|
||||
|
|
@ -45,8 +45,8 @@ B1temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
model->B1Cox = Cox; /* unit: F/cm**2 */
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) {
|
||||
SPfrontEnd->IFerrorf (ERR_FATAL,
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ B1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for( ; model != NULL; model = model->B1nextModel) {
|
||||
for(here=model->B1instances;here!=NULL;here = here->B1nextInstance){
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here=B1instances(model);here!=NULL;here = B1nextInstance(here)){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ B2acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m; /* parallel multiplier */
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = model->B2nextModel) {
|
||||
for(here = model->B2instances; here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = B2nextInstance(here)) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ B2convTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
/* loop through all the B2 device models */
|
||||
for( ; model != NULL; model = model->B2nextModel ) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
vbs = model->B2type * (
|
||||
*(ckt->CKTrhsOld+here->B2bNode) -
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ B2getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
* external nodes to get values
|
||||
*/
|
||||
|
||||
for( ; model ; model = model->B2nextModel) {
|
||||
for(here = model->B2instances; here ; here = here->B2nextInstance) {
|
||||
for( ; model ; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here ; here = B2nextInstance(here)) {
|
||||
|
||||
if(!here->B2icVBSGiven) {
|
||||
here->B2icVBS =
|
||||
|
|
|
|||
|
|
@ -130,11 +130,11 @@ B2load(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
/* loop through all the B2 device models */
|
||||
for( ; model != NULL; model = model->B2nextModel ) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B2l - model->B2deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B2drainArea;
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ B2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (model=firstModel; model != NULL; model=model->B2nextModel) {
|
||||
for (inst=model->B2instances; inst != NULL; inst=inst->B2nextInstance) {
|
||||
for (model=firstModel; model != NULL; model=B2nextModel(model)) {
|
||||
for (inst=B2instances(model); inst != NULL; inst=B2nextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -53,9 +53,9 @@ B2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->B2nextModel) {
|
||||
for(here = model->B2instances; here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = B2nextInstance(here)) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
CKTnode *tmp;
|
||||
|
||||
/* loop through all the B2 device models */
|
||||
for( ; model != NULL; model = model->B2nextModel ) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
|
||||
/* Default value Processing for B2 MOSFET Models */
|
||||
if( ! model->B2typeGiven) {
|
||||
|
|
@ -431,8 +431,8 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
}
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B2states = *states;
|
||||
|
|
@ -576,10 +576,10 @@ B2unsetup(
|
|||
B2instance *here;
|
||||
|
||||
for (model = (B2model *)inModel; model != NULL;
|
||||
model = model->B2nextModel)
|
||||
model = B2nextModel(model))
|
||||
{
|
||||
for (here = model->B2instances; here != NULL;
|
||||
here=here->B2nextInstance)
|
||||
for (here = B2instances(model); here != NULL;
|
||||
here=B2nextInstance(here))
|
||||
{
|
||||
if (here->B2sNodePrime > 0
|
||||
&& here->B2sNodePrime != here->B2sNode)
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
NG_IGNORE(ckt);
|
||||
|
||||
/* loop through all the B2 device models */
|
||||
for( ; model != NULL; model = model->B2nextModel ) {
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
|
||||
/* Default value Processing for B2 MOSFET Models */
|
||||
/* Some Limiting for Model Parameters */
|
||||
|
|
@ -50,8 +50,8 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
pLastKnot = NULL;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ B2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for( ; model != NULL; model = model->B2nextModel) {
|
||||
for(here=model->B2instances;here!=NULL;here = here->B2nextInstance){
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here=B2instances(model);here!=NULL;here = B2nextInstance(here)){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ double xcsbbi, xcggbi, xcgdbi, xcgsbi, xcgbbi;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
Csd = -(here->BSIM3cddb + here->BSIM3cgdb + here->BSIM3cbdb);
|
||||
Csg = -(here->BSIM3cdgb + here->BSIM3cggb + here->BSIM3cbgb);
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the BSIM3 device models */
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
vbs = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3bNode)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ CKTcircuit *ckt)
|
|||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
|
||||
for (; model ; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here; here = BSIM3nextInstance(here))
|
||||
{
|
||||
if (!here->BSIM3icVBSGiven)
|
||||
{ here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ CKTcircuit *ckt)
|
|||
|
||||
|
||||
int BSIM3LoadOMP(BSIM3instance *here, CKTcircuit *ckt) {
|
||||
BSIM3model *model = here->BSIM3modPtr;
|
||||
BSIM3model *model = BSIM3modPtr(here);
|
||||
#else
|
||||
BSIM3model *model = (BSIM3model*)inModel;
|
||||
BSIM3instance *here;
|
||||
|
|
@ -179,9 +179,9 @@ ChargeComputationNeeded =
|
|||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)))
|
||||
? 1 : 0;
|
||||
#ifndef USE_OMP
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
#endif
|
||||
Check = 1;
|
||||
|
|
@ -3136,7 +3136,7 @@ void BSIM3LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
for(idx = 0; idx < InstCount; idx++) {
|
||||
here = InstArray[idx];
|
||||
model = here->BSIM3modPtr;
|
||||
model = BSIM3modPtr(here);
|
||||
/* Update b for Ax = b */
|
||||
(*(ckt->CKTrhs + here->BSIM3gNode) -= here->BSIM3rhsG);
|
||||
(*(ckt->CKTrhs + here->BSIM3bNode) -= here->BSIM3rhsB);
|
||||
|
|
|
|||
|
|
@ -139,9 +139,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{ pParam = here->pParam;
|
||||
switch (operation)
|
||||
{ case N_OPEN:
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css;
|
|||
double ScalingFactor = 1.0e-9;
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3mode >= 0)
|
||||
{ Gm = here->BSIM3gm;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ BSIM3instance **InstArray;
|
|||
|
||||
|
||||
/* loop through all the BSIM3 device models */
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
for( ; model != NULL; model = BSIM3nextModel(model))
|
||||
{
|
||||
/* Default value Processing for BSIM3 MOSFET Models */
|
||||
if (!model->BSIM3typeGiven)
|
||||
|
|
@ -920,8 +920,8 @@ BSIM3instance **InstArray;
|
|||
model->BSIM3vbdrMax = 1e99;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->BSIM3states = *states;
|
||||
|
|
@ -1129,11 +1129,11 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
/* loop through all the BSIM3 device models
|
||||
to count the number of instances */
|
||||
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
for( ; model != NULL; model = BSIM3nextModel(model))
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
|
|
@ -1146,11 +1146,11 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
model->BSIM3InstCount = InstCount;
|
||||
model->BSIM3InstanceArray = InstArray;
|
||||
idx = 0;
|
||||
for( ; model != NULL; model = model->BSIM3nextModel )
|
||||
for( ; model != NULL; model = BSIM3nextModel(model))
|
||||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
idx++;
|
||||
|
|
@ -1170,10 +1170,10 @@ BSIM3unsetup(
|
|||
BSIM3instance *here;
|
||||
|
||||
for (model = (BSIM3model *)inModel; model != NULL;
|
||||
model = model->BSIM3nextModel)
|
||||
model = BSIM3nextModel(model))
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here=here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3qNode > 0)
|
||||
CKTdltNNum(ckt, here->BSIM3qNode);
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ BSIM3soaCheck(CKTcircuit *ckt, GENmodel *inModel)
|
|||
|
||||
maxwarns = ckt->CKTsoaMaxWarns;
|
||||
|
||||
for (; model; model = model->BSIM3nextModel) {
|
||||
for (; model; model = BSIM3nextModel(model)) {
|
||||
|
||||
for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance) {
|
||||
for (here = BSIM3instances(model); here; here = BSIM3nextInstance(here)) {
|
||||
|
||||
vgs = ckt->CKTrhsOld [here->BSIM3gNode] -
|
||||
ckt->CKTrhsOld [here->BSIM3sNodePrime];
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ double Nvtm, SourceSatCurrent, DrainSatCurrent;
|
|||
int Size_Not_Found, error;
|
||||
|
||||
/* loop through all the BSIM3 device models */
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->BSIM3bulkJctPotential < 0.1)
|
||||
{ model->BSIM3bulkJctPotential = 0.1;
|
||||
|
|
@ -143,8 +143,8 @@ int Size_Not_Found, error;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ BSIM3instance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -48,11 +48,11 @@ FILE *fpdebug = NULL;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{
|
||||
|
||||
for (here = model->B3SOIDDinstances; here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
if (here->B3SOIDDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the B3SOIDD device models */
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->B3SOIDDinstances; here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIDDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIDDbNode)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ B3SOIDDgetic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
||||
B3SOIDDinstance *here;
|
||||
|
||||
for (; model ; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance)
|
||||
for (; model ; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here; here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIDDicVBSGiven)
|
||||
{ here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode)
|
||||
|
|
|
|||
|
|
@ -304,9 +304,9 @@ char nanmessage [12];
|
|||
double m;
|
||||
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
{ Gm = here->B3SOIDDgm;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ IFuid tmpName;
|
|||
|
||||
|
||||
/* loop through all the B3SOIDD device models */
|
||||
for( ; model != NULL; model = model->B3SOIDDnextModel )
|
||||
for( ; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{
|
||||
/* Default value Processing for B3SOIDD MOSFET Models */
|
||||
|
||||
|
|
@ -874,8 +874,8 @@ IFuid tmpName;
|
|||
model->B3SOIDDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIDDinstances; here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIDDstates = *states;
|
||||
|
|
@ -1357,10 +1357,10 @@ B3SOIDDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B3SOIDDinstance *here;
|
||||
|
||||
for (model = (B3SOIDDmodel *)inModel; model != NULL;
|
||||
model = model->B3SOIDDnextModel)
|
||||
model = B3SOIDDnextModel(model))
|
||||
{
|
||||
for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIDDdum5Node > 0)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ double SDphi, SDgamma;
|
|||
int Size_Not_Found;
|
||||
|
||||
/* loop through all the B3SOIDD device models */
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->B3SOIDDGatesidewallJctPotential < 0.1)
|
||||
model->B3SOIDDGatesidewallJctPotential = 0.1;
|
||||
|
|
@ -72,8 +72,8 @@ int Size_Not_Found;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
|
||||
model->B3SOIDDrbsh;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ B3SOIDDinstance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ FILE *fpdebug = NULL;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{
|
||||
|
||||
for (here = model->B3SOIFDinstances; here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
if (here->B3SOIFDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the B3SOIFD device models */
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->B3SOIFDinstances; here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIFDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIFDbNode)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ B3SOIFDgetic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
||||
B3SOIFDinstance *here;
|
||||
|
||||
for (; model ; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance)
|
||||
for (; model ; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here; here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIFDicVBSGiven)
|
||||
{ here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode)
|
||||
|
|
|
|||
|
|
@ -274,9 +274,9 @@ char nanmessage [12];
|
|||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -127,9 +127,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
{ Gm = here->B3SOIFDgm;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ IFuid tmpName;
|
|||
|
||||
|
||||
/* loop through all the B3SOIFD device models */
|
||||
for( ; model != NULL; model = model->B3SOIFDnextModel )
|
||||
for( ; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{
|
||||
/* Default value Processing for B3SOIFD MOSFET Models */
|
||||
|
||||
|
|
@ -875,8 +875,8 @@ IFuid tmpName;
|
|||
model->B3SOIFDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIFDinstances; here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIFDstates = *states;
|
||||
|
|
@ -1346,10 +1346,10 @@ B3SOIFDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B3SOIFDinstance *here;
|
||||
|
||||
for (model = (B3SOIFDmodel *)inModel; model != NULL;
|
||||
model = model->B3SOIFDnextModel)
|
||||
model = B3SOIFDnextModel(model))
|
||||
{
|
||||
for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIFDdum5Node > 0)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ double SDphi, SDgamma;
|
|||
int Size_Not_Found;
|
||||
|
||||
/* loop through all the B3SOIFD device models */
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->B3SOIFDGatesidewallJctPotential < 0.1)
|
||||
model->B3SOIFDGatesidewallJctPotential = 0.1;
|
||||
|
|
@ -71,8 +71,8 @@ int Size_Not_Found;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
|
||||
model->B3SOIFDrbsh;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ B3SOIFDinstance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ double xcedb, xcesb;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{
|
||||
|
||||
for (here = model->B3SOIPDinstances; here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the B3SOIPD device models */
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->B3SOIPDinstances; here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIPDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIPDbNode)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ B3SOIPDgetic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
B3SOIPDmodel *model = (B3SOIPDmodel*)inModel;
|
||||
B3SOIPDinstance *here;
|
||||
|
||||
for (; model ; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance)
|
||||
for (; model ; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here; here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIPDicVBSGiven)
|
||||
{ here->B3SOIPDicVBS = *(ckt->CKTrhs + here->B3SOIPDbNode)
|
||||
|
|
|
|||
|
|
@ -291,9 +291,9 @@ double gigT;
|
|||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -131,9 +131,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
{ Gm = here->B3SOIPDgm;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ IFuid tmpName;
|
|||
|
||||
|
||||
/* loop through all the B3SOIPD device models */
|
||||
for( ; model != NULL; model = model->B3SOIPDnextModel )
|
||||
for( ; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{
|
||||
/* Default value Processing for B3SOIPD MOSFET Models */
|
||||
|
||||
|
|
@ -1048,8 +1048,8 @@ IFuid tmpName;
|
|||
model->B3SOIPDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIPDinstances; here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIPDstates = *states;
|
||||
|
|
@ -1461,10 +1461,10 @@ B3SOIPDunsetup(
|
|||
B3SOIPDinstance *here;
|
||||
|
||||
for (model = (B3SOIPDmodel *)inModel; model != NULL;
|
||||
model = model->B3SOIPDnextModel)
|
||||
model = B3SOIPDnextModel(model))
|
||||
{
|
||||
for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIPDqjdNode > 0)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ double tmp3, T7;
|
|||
|
||||
|
||||
/* loop through all the B3SOIPD device models */
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->B3SOIPDGatesidewallJctPotential < 0.1)
|
||||
model->B3SOIPDGatesidewallJctPotential = 0.1;
|
||||
|
|
@ -90,8 +90,8 @@ double tmp3, T7;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
here->B3SOIPDrbodyext = here->B3SOIPDbodySquares *
|
||||
model->B3SOIPDrbsh;
|
||||
|
|
|
|||
|
|
@ -27,9 +27,9 @@ B3SOIPDinstance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ double dxpart, sxpart, cqgb, cqdb, cqsb, cqbb, xcqgb, xcqdb, xcqsb, xcqbb;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{
|
||||
|
||||
|
||||
for (here = model->BSIM3v0instances; here!= NULL;
|
||||
here = here->BSIM3v0nextInstance)
|
||||
for (here = BSIM3v0instances(model); here!= NULL;
|
||||
here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v0mode >= 0)
|
||||
{ Gm = here->BSIM3v0gm;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the BSIM3v0 device models */
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v0instances; here != NULL ;
|
||||
here=here->BSIM3v0nextInstance)
|
||||
for (here = BSIM3v0instances(model); here != NULL ;
|
||||
here=BSIM3v0nextInstance(here))
|
||||
{
|
||||
vbs = model->BSIM3v0type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3v0bNode)
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ BSIM3v0getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
BSIM3v0model *model = (BSIM3v0model*)inModel;
|
||||
BSIM3v0instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3v0nextModel)
|
||||
{ for (here = model->BSIM3v0instances; here; here = here->BSIM3v0nextInstance)
|
||||
for (; model ; model = BSIM3v0nextModel(model))
|
||||
{ for (here = BSIM3v0instances(model); here; here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
if(!here->BSIM3v0icVBSGiven)
|
||||
{ here->BSIM3v0icVBS = *(ckt->CKTrhs + here->BSIM3v0bNode)
|
||||
|
|
|
|||
|
|
@ -119,9 +119,9 @@ struct bsim3v0SizeDependParam *pParam;
|
|||
int ByPass, Check, ChargeComputationNeeded = 0, error;
|
||||
double m = 1.0;
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
{ for (here = model->BSIM3v0instances; here != NULL;
|
||||
here = here->BSIM3v0nextInstance)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ for (here = BSIM3v0instances(model); here != NULL;
|
||||
here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
Check = 1;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -100,9 +100,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
{ for (here = model->BSIM3v0instances; here != NULL;
|
||||
here = here->BSIM3v0nextInstance)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ for (here = BSIM3v0instances(model); here != NULL;
|
||||
here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
{ for (here = model->BSIM3v0instances; here!= NULL;
|
||||
here = here->BSIM3v0nextInstance)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ for (here = BSIM3v0instances(model); here!= NULL;
|
||||
here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v0mode >= 0)
|
||||
{ Gm = here->BSIM3v0gm;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ CKTnode *tmpNode;
|
|||
IFuid tmpName;
|
||||
|
||||
/* loop through all the BSIM3v0 device models */
|
||||
for( ; model != NULL; model = model->BSIM3v0nextModel )
|
||||
for( ; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{
|
||||
/* Default value Processing for BSIM3v0 MOSFET Models */
|
||||
if (!model->BSIM3v0typeGiven)
|
||||
|
|
@ -749,8 +749,8 @@ IFuid tmpName;
|
|||
if (!model->BSIM3v0kfGiven)
|
||||
model->BSIM3v0kf = 0.0;
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v0instances; here != NULL ;
|
||||
here=here->BSIM3v0nextInstance)
|
||||
for (here = BSIM3v0instances(model); here != NULL ;
|
||||
here=BSIM3v0nextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->BSIM3v0states = *states;
|
||||
|
|
@ -899,10 +899,10 @@ BSIM3v0unsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
BSIM3v0instance *here;
|
||||
|
||||
for (model = (BSIM3v0model *)inModel; model != NULL;
|
||||
model = model->BSIM3v0nextModel)
|
||||
model = BSIM3v0nextModel(model))
|
||||
{
|
||||
for (here = model->BSIM3v0instances; here != NULL;
|
||||
here=here->BSIM3v0nextInstance)
|
||||
for (here = BSIM3v0instances(model); here != NULL;
|
||||
here=BSIM3v0nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v0qNode > 0)
|
||||
CKTdltNNum(ckt, here->BSIM3v0qNode);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom;
|
|||
int Size_Not_Found;
|
||||
|
||||
/* loop through all the BSIM3v0 device models */
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ Temp = ckt->CKTtemp;
|
||||
if (model->BSIM3v0bulkJctPotential < 0.1)
|
||||
model->BSIM3v0bulkJctPotential = 0.1;
|
||||
|
|
@ -49,8 +49,8 @@ int Size_Not_Found;
|
|||
TRatio = Temp / Tnom;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v0instances; here != NULL;
|
||||
here=here->BSIM3v0nextInstance)
|
||||
for (here = BSIM3v0instances(model); here != NULL;
|
||||
here=BSIM3v0nextInstance(here))
|
||||
{
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ BSIM3v0instance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v0nextModel)
|
||||
{ for (here = model->BSIM3v0instances; here != NULL;
|
||||
here = here->BSIM3v0nextInstance)
|
||||
for (; model != NULL; model = BSIM3v0nextModel(model))
|
||||
{ for (here = BSIM3v0instances(model); here != NULL;
|
||||
here = BSIM3v0nextInstance(here))
|
||||
{
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ BSIM3v1acLoad (GENmodel * inModel, CKTcircuit * ckt)
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3v1nextModel)
|
||||
for (; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{
|
||||
|
||||
|
||||
for (here = model->BSIM3v1instances; here != NULL;
|
||||
here = here->BSIM3v1nextInstance)
|
||||
for (here = BSIM3v1instances(model); here != NULL;
|
||||
here = BSIM3v1nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v1mode >= 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds;
|
|||
double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
||||
|
||||
/* loop through all the BSIM3v1 device models */
|
||||
for (; model != NULL; model = model->BSIM3v1nextModel)
|
||||
for (; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v1instances; here != NULL ;
|
||||
here=here->BSIM3v1nextInstance)
|
||||
for (here = BSIM3v1instances(model); here != NULL ;
|
||||
here=BSIM3v1nextInstance(here))
|
||||
{
|
||||
vbs = model->BSIM3v1type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3v1bNode)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ BSIM3v1getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
BSIM3v1model *model = (BSIM3v1model*)inModel;
|
||||
BSIM3v1instance *here;
|
||||
|
||||
for (; model ; model = model->BSIM3v1nextModel)
|
||||
{ for (here = model->BSIM3v1instances; here; here = here->BSIM3v1nextInstance)
|
||||
for (; model ; model = BSIM3v1nextModel(model))
|
||||
{ for (here = BSIM3v1instances(model); here; here = BSIM3v1nextInstance(here))
|
||||
{
|
||||
if(!here->BSIM3v1icVBSGiven)
|
||||
{ here->BSIM3v1icVBS = *(ckt->CKTrhs + here->BSIM3v1bNode)
|
||||
|
|
|
|||
|
|
@ -125,9 +125,9 @@ double m = 1.0;
|
|||
struct bsim3v1SizeDependParam *pParam;
|
||||
int ByPass, Check, ChargeComputationNeeded = 0, error;
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v1nextModel)
|
||||
{ for (here = model->BSIM3v1instances; here != NULL;
|
||||
here = here->BSIM3v1nextInstance)
|
||||
for (; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{ for (here = BSIM3v1instances(model); here != NULL;
|
||||
here = BSIM3v1nextInstance(here))
|
||||
{
|
||||
Check = 1;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -123,9 +123,9 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v1nextModel)
|
||||
{ for (here = model->BSIM3v1instances; here != NULL;
|
||||
here = here->BSIM3v1nextInstance)
|
||||
for (; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{ for (here = BSIM3v1instances(model); here != NULL;
|
||||
here = BSIM3v1nextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->BSIM3v1nextModel)
|
||||
{ for (here = model->BSIM3v1instances; here!= NULL;
|
||||
here = here->BSIM3v1nextInstance)
|
||||
for (; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{ for (here = BSIM3v1instances(model); here!= NULL;
|
||||
here = BSIM3v1nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v1mode >= 0)
|
||||
{ Gm = here->BSIM3v1gm;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ CKTnode *tmpNode;
|
|||
IFuid tmpName;
|
||||
|
||||
/* loop through all the BSIM3v1 device models */
|
||||
for( ; model != NULL; model = model->BSIM3v1nextModel )
|
||||
for( ; model != NULL; model = BSIM3v1nextModel(model))
|
||||
{
|
||||
/* Default value Processing for BSIM3v1 MOSFET Models */
|
||||
if (!model->BSIM3v1typeGiven)
|
||||
|
|
@ -775,8 +775,8 @@ IFuid tmpName;
|
|||
if (!model->BSIM3v1kfGiven)
|
||||
model->BSIM3v1kf = 0.0;
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3v1instances; here != NULL ;
|
||||
here=here->BSIM3v1nextInstance)
|
||||
for (here = BSIM3v1instances(model); here != NULL ;
|
||||
here=BSIM3v1nextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->BSIM3v1states = *states;
|
||||
|
|
@ -959,10 +959,10 @@ BSIM3v1unsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
BSIM3v1instance *here;
|
||||
|
||||
for (model = (BSIM3v1model *)inModel; model != NULL;
|
||||
model = model->BSIM3v1nextModel)
|
||||
model = BSIM3v1nextModel(model))
|
||||
{
|
||||
for (here = model->BSIM3v1instances; here != NULL;
|
||||
here=here->BSIM3v1nextInstance)
|
||||
for (here = BSIM3v1instances(model); here != NULL;
|
||||
here=BSIM3v1nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3v1qNode > 0)
|
||||
CKTdltNNum(ckt, here->BSIM3v1qNode);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue