white space changes

This commit is contained in:
Francesco Lannutti 2012-10-22 23:06:25 +02:00
parent c23bd59c44
commit 5f34eb2729
104 changed files with 146 additions and 172 deletions

View File

@ -100,9 +100,9 @@ DCpss(CKTcircuit *ckt, int restart)
IFuid *nameList;
int numNames;
double maxstepsize=0.0;
int ltra_num;
CKTnode *node;
#ifdef XSPICE
/* gtri - add - wbk - 12/19/90 - Add IPC stuff */
Ipc_Boolean_t ipc_firsttime = IPC_TRUE;

View File

@ -276,9 +276,9 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
CKTnode *tmpNode;
IFuid tmpName;
/* allocate a chunk of the state vector */
here->B1states = *states;
*states += B1numStates;
/* allocate a chunk of the state vector */
here->B1states = *states;
*states += B1numStates;
/* perform the parameter defaulting */
if(!here->B1drainAreaGiven) {

View File

@ -434,9 +434,9 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
for (here = model->B2instances; here != NULL ;
here=here->B2nextInstance) {
/* allocate a chunk of the state vector */
here->B2states = *states;
*states += B2numStates;
/* allocate a chunk of the state vector */
here->B2states = *states;
*states += B2numStates;
/* perform the parameter defaulting */

View File

@ -33,7 +33,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->BSIM3instances; here != NULL ;
here=here->BSIM3nextInstance)
{
{
vbs = model->BSIM3type
* (*(ckt->CKTrhsOld+here->BSIM3bNode)
- *(ckt->CKTrhsOld+here->BSIM3sNodePrime));

View File

@ -25,7 +25,7 @@ BSIM3instance *here;
for (; model ; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance)
{
{
if (!here->BSIM3icVBSGiven)
{ here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode)
- *(ckt->CKTrhs + here->BSIM3sNode);
@ -42,5 +42,3 @@ BSIM3instance *here;
}
return(OK);
}

View File

@ -185,7 +185,7 @@ ChargeComputationNeeded =
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
{
#endif
Check = 1;
ByPass = 0;

View File

@ -40,7 +40,7 @@ double m;
for (; model != NULL; model = model->BSIM3nextModel)
{ for (here = model->BSIM3instances; here!= NULL;
here = here->BSIM3nextInstance)
{
{
if (here->BSIM3mode >= 0)
{ Gm = here->BSIM3gm;
Gmbs = here->BSIM3gmbs;

View File

@ -864,9 +864,10 @@ BSIM3instance **InstArray;
for (here = model->BSIM3instances; here != NULL ;
here=here->BSIM3nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM3states = *states;
*states += BSIM3numStates;
/* allocate a chunk of the state vector */
here->BSIM3states = *states;
*states += BSIM3numStates;
/* perform the parameter defaulting */
if (!here->BSIM3drainAreaGiven)
here->BSIM3drainArea = 0.0;

View File

@ -144,7 +144,7 @@ int Size_Not_Found;
/* MCJ: Length and Width not initialized */
for (here = model->BSIM3instances; here != NULL;
here = here->BSIM3nextInstance)
{
{
pSizeDependParamKnot = model->pSizeDependParamKnot;
Size_Not_Found = 1;
while ((pSizeDependParamKnot != NULL) && Size_Not_Found)

View File

@ -48,6 +48,3 @@ BSIM3instance *here;
}
return(OK);
}

View File

@ -80,7 +80,7 @@ double m;
for (here = model->B4SOIinstances; here!= NULL;
here = here->B4SOInextInstance)
{
{
selfheat = (model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0);
if (here->B4SOImode >= 0)
{ Gm = here->B4SOIgm;

View File

@ -40,7 +40,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->B4SOIinstances; here != NULL ;
here=here->B4SOInextInstance)
{
{
vbs = model->B4SOItype
* (*(ckt->CKTrhsOld+here->B4SOIbNode)
- *(ckt->CKTrhsOld+here->B4SOIsNodePrime));

View File

@ -34,7 +34,7 @@ B4SOImodel *oldmod = NULL;
oldmod = mod;
prev = (B4SOIinstance *)NULL;
for (here = mod->B4SOIinstances; here; here = here->B4SOInextInstance)
{
{
if(prev) FREE(prev);
prev = here;
}

View File

@ -32,7 +32,7 @@ B4SOIinstance *here;
for (; model ; model = model->B4SOInextModel)
{ for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance)
{
{
if(!here->B4SOIicVBSGiven)
{ here->B4SOIicVBS = *(ckt->CKTrhs + here->B4SOIbNode)
- *(ckt->CKTrhs + here->B4SOIsNode);

View File

@ -496,6 +496,7 @@ int B4SOILoadOMP(B4SOIinstance *here, CKTcircuit *ckt) {
{ for (here = model->B4SOIinstances; here != NULL;
here = here->B4SOInextInstance)
{
#endif
Check = 0;
ByPass = 0;

View File

@ -44,7 +44,7 @@ B4SOImodel **oldmod;
delgot:
*oldmod = (*model)->B4SOInextModel; /* cut deleted device out of list */
for (here = (*model)->B4SOIinstances; here; here = here->B4SOInextInstance)
{
{
if(prev) FREE(prev);
prev = here;
}
@ -52,6 +52,3 @@ delgot:
FREE(*model);
return(OK);
}

View File

@ -151,7 +151,7 @@ double m;
for (; model != NULL; model = model->B4SOInextModel)
{ for (here = model->B4SOIinstances; here != NULL;
here = here->B4SOInextInstance)
{
{
m = here->B4SOIm;
pParam = here->pParam;

View File

@ -38,6 +38,7 @@ register B4SOIinstance *here;
{ for (here = model->B4SOIinstances; here != NULL;
here = here->B4SOInextInstance)
{
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */

View File

@ -33,7 +33,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->B3SOIDDinstances; here != NULL ;
here=here->B3SOIDDnextInstance)
{
{
vbs = model->B3SOIDDtype
* (*(ckt->CKTrhsOld+here->B3SOIDDbNode)
- *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime));

View File

@ -25,7 +25,7 @@ B3SOIDDinstance *here;
for (; model ; model = model->B3SOIDDnextModel)
{ for (here = model->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance)
{
{
if(!here->B3SOIDDicVBSGiven)
{ here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode)
- *(ckt->CKTrhs + here->B3SOIDDsNode);

View File

@ -308,7 +308,7 @@ double m;
for (; model != NULL; model = model->B3SOIDDnextModel)
{ for (here = model->B3SOIDDinstances; here != NULL;
here = here->B3SOIDDnextInstance)
{
{
Check = 0;
ByPass = 0;
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);

View File

@ -131,7 +131,7 @@ int i;
for (; model != NULL; model = model->B3SOIDDnextModel)
{ for (here = model->B3SOIDDinstances; here != NULL;
here = here->B3SOIDDnextInstance)
{
{
pParam = here->pParam;
switch (operation)
{ case N_OPEN:

View File

@ -876,10 +876,10 @@ IFuid tmpName;
/* loop through all the instances of the model */
for (here = model->B3SOIDDinstances; here != NULL ;
here=here->B3SOIDDnextInstance)
{
/* allocate a chunk of the state vector */
here->B3SOIDDstates = *states;
*states += B3SOIDDnumStates;
{
/* allocate a chunk of the state vector */
here->B3SOIDDstates = *states;
*states += B3SOIDDnumStates;
/* perform the parameter defaulting */
if (!here->B3SOIDDdrainAreaGiven)

View File

@ -74,7 +74,7 @@ int Size_Not_Found;
/* MCJ: Length and Width not initialized */
for (here = model->B3SOIDDinstances; here != NULL;
here = here->B3SOIDDnextInstance)
{
{
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
model->B3SOIDDrbsh;
pSizeDependParamKnot = model->pSizeDependParamKnot;

View File

@ -54,7 +54,7 @@ double m;
for (here = model->B3SOIFDinstances; here!= NULL;
here = here->B3SOIFDnextInstance)
{
{
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
if (here->B3SOIFDdebugMod > 2)
{

View File

@ -33,7 +33,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->B3SOIFDinstances; here != NULL ;
here=here->B3SOIFDnextInstance)
{
{
vbs = model->B3SOIFDtype
* (*(ckt->CKTrhsOld+here->B3SOIFDbNode)
- *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime));

View File

@ -25,7 +25,7 @@ B3SOIFDinstance *here;
for (; model ; model = model->B3SOIFDnextModel)
{ for (here = model->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance)
{
{
if(!here->B3SOIFDicVBSGiven)
{ here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode)
- *(ckt->CKTrhs + here->B3SOIFDsNode);

View File

@ -278,7 +278,7 @@ double m;
for (; model != NULL; model = model->B3SOIFDnextModel)
{ for (here = model->B3SOIFDinstances; here != NULL;
here = here->B3SOIFDnextInstance)
{
{
Check = 0;
ByPass = 0;
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);

View File

@ -131,7 +131,7 @@ int i;
for (; model != NULL; model = model->B3SOIFDnextModel)
{ for (here = model->B3SOIFDinstances; here != NULL;
here = here->B3SOIFDnextInstance)
{
{
pParam = here->pParam;
switch (operation)
{ case N_OPEN:

View File

@ -877,10 +877,10 @@ IFuid tmpName;
/* loop through all the instances of the model */
for (here = model->B3SOIFDinstances; here != NULL ;
here=here->B3SOIFDnextInstance)
{
/* allocate a chunk of the state vector */
here->B3SOIFDstates = *states;
*states += B3SOIFDnumStates;
{
/* allocate a chunk of the state vector */
here->B3SOIFDstates = *states;
*states += B3SOIFDnumStates;
/* perform the parameter defaulting */
if (!here->B3SOIFDdrainAreaGiven)

View File

@ -73,7 +73,7 @@ int Size_Not_Found;
/* MCJ: Length and Width not initialized */
for (here = model->B3SOIFDinstances; here != NULL;
here = here->B3SOIFDnextInstance)
{
{
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
model->B3SOIFDrbsh;
pSizeDependParamKnot = model->pSizeDependParamKnot;

View File

@ -48,6 +48,3 @@ B3SOIFDinstance *here;
}
return(OK);
}

View File

@ -54,7 +54,7 @@ double m;
for (here = model->B3SOIPDinstances; here!= NULL;
here = here->B3SOIPDnextInstance)
{
{
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
if (here->B3SOIPDmode >= 0)
{ Gm = here->B3SOIPDgm;

View File

@ -33,7 +33,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->B3SOIPDinstances; here != NULL ;
here=here->B3SOIPDnextInstance)
{
{
vbs = model->B3SOIPDtype
* (*(ckt->CKTrhsOld+here->B3SOIPDbNode)
- *(ckt->CKTrhsOld+here->B3SOIPDsNodePrime));

View File

@ -25,7 +25,7 @@ B3SOIPDinstance *here;
for (; model ; model = model->B3SOIPDnextModel)
{ for (here = model->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance)
{
{
if(!here->B3SOIPDicVBSGiven)
{ here->B3SOIPDicVBS = *(ckt->CKTrhs + here->B3SOIPDbNode)
- *(ckt->CKTrhs + here->B3SOIPDsNode);

View File

@ -294,7 +294,7 @@ double m;
for (; model != NULL; model = model->B3SOIPDnextModel)
{ for (here = model->B3SOIPDinstances; here != NULL;
here = here->B3SOIPDnextInstance)
{
{
Check = 0;
ByPass = 0;
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);

View File

@ -135,7 +135,7 @@ int i;
for (; model != NULL; model = model->B3SOIPDnextModel)
{ for (here = model->B3SOIPDinstances; here != NULL;
here = here->B3SOIPDnextInstance)
{
{
pParam = here->pParam;
switch (operation)
{ case N_OPEN:

View File

@ -36,7 +36,7 @@ double m;
for (; model != NULL; model = model->B3SOIPDnextModel)
{ for (here = model->B3SOIPDinstances; here!= NULL;
here = here->B3SOIPDnextInstance)
{
{
if (here->B3SOIPDmode >= 0)
{ Gm = here->B3SOIPDgm;
Gmbs = here->B3SOIPDgmbs;

View File

@ -1050,10 +1050,10 @@ IFuid tmpName;
/* loop through all the instances of the model */
for (here = model->B3SOIPDinstances; here != NULL ;
here=here->B3SOIPDnextInstance)
{
/* allocate a chunk of the state vector */
here->B3SOIPDstates = *states;
*states += B3SOIPDnumStates;
{
/* allocate a chunk of the state vector */
here->B3SOIPDstates = *states;
*states += B3SOIPDnumStates;
/* perform the parameter defaulting */
if (!here->B3SOIPDdrainAreaGiven)

View File

@ -92,7 +92,7 @@ double tmp3, T7;
/* MCJ: Length and Width not initialized */
for (here = model->B3SOIPDinstances; here != NULL;
here = here->B3SOIPDnextInstance)
{
{
here->B3SOIPDrbodyext = here->B3SOIPDbodySquares *
model->B3SOIPDrbsh;
pSizeDependParamKnot = model->pSizeDependParamKnot;

View File

@ -47,6 +47,3 @@ B3SOIPDinstance *here;
}
return(OK);
}

View File

@ -32,7 +32,7 @@ double m;
for (here = model->BSIM3v0instances; here!= NULL;
here = here->BSIM3v0nextInstance)
{
{
if (here->BSIM3v0mode >= 0)
{ Gm = here->BSIM3v0gm;
Gmbs = here->BSIM3v0gmbs;

View File

@ -27,7 +27,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->BSIM3v0instances; here != NULL ;
here=here->BSIM3v0nextInstance)
{
{
vbs = model->BSIM3v0type
* (*(ckt->CKTrhsOld+here->BSIM3v0bNode)
- *(ckt->CKTrhsOld+here->BSIM3v0sNodePrime));

View File

@ -19,7 +19,7 @@ BSIM3v0instance *here;
for (; model ; model = model->BSIM3v0nextModel)
{ for (here = model->BSIM3v0instances; here; here = here->BSIM3v0nextInstance)
{
{
if(!here->BSIM3v0icVBSGiven)
{ here->BSIM3v0icVBS = *(ckt->CKTrhs + here->BSIM3v0bNode)
- *(ckt->CKTrhs + here->BSIM3v0sNode);

View File

@ -122,7 +122,7 @@ double m = 1.0;
for (; model != NULL; model = model->BSIM3v0nextModel)
{ for (here = model->BSIM3v0instances; here != NULL;
here = here->BSIM3v0nextInstance)
{
{
Check = 1;
ByPass = 0;
pParam = here->pParam;

View File

@ -104,7 +104,7 @@ int i;
for (; model != NULL; model = model->BSIM3v0nextModel)
{ for (here = model->BSIM3v0instances; here != NULL;
here = here->BSIM3v0nextInstance)
{
{
pParam = here->pParam;
switch (operation)
{ case N_OPEN:

View File

@ -751,12 +751,11 @@ IFuid tmpName;
/* loop through all the instances of the model */
for (here = model->BSIM3v0instances; here != NULL ;
here=here->BSIM3v0nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM3v0states = *states;
*states += BSIM3v0numStates;
{
/* allocate a chunk of the state vector */
here->BSIM3v0states = *states;
*states += BSIM3v0numStates;
/* perform the parameter defaulting */
if (!here->BSIM3v0drainAreaGiven)
here->BSIM3v0drainArea = 0.0;

View File

@ -51,7 +51,7 @@ int Size_Not_Found;
/* loop through all the instances of the model */
for (here = model->BSIM3v0instances; here != NULL;
here=here->BSIM3v0nextInstance)
{
{
pSizeDependParamKnot = model->pSizeDependParamKnot;
Size_Not_Found = 1;
while ((pSizeDependParamKnot != NULL) && Size_Not_Found)

View File

@ -42,6 +42,3 @@ BSIM3v0instance *here;
}
return(OK);
}

View File

@ -33,7 +33,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
{ /* loop through all the instances of the model */
for (here = model->BSIM3v1instances; here != NULL ;
here=here->BSIM3v1nextInstance)
{
{
vbs = model->BSIM3v1type
* (*(ckt->CKTrhsOld+here->BSIM3v1bNode)
- *(ckt->CKTrhsOld+here->BSIM3v1sNodePrime));

View File

@ -25,7 +25,7 @@ BSIM3v1instance *here;
for (; model ; model = model->BSIM3v1nextModel)
{ for (here = model->BSIM3v1instances; here; here = here->BSIM3v1nextInstance)
{
{
if(!here->BSIM3v1icVBSGiven)
{ here->BSIM3v1icVBS = *(ckt->CKTrhs + here->BSIM3v1bNode)
- *(ckt->CKTrhs + here->BSIM3v1sNode);
@ -42,5 +42,3 @@ BSIM3v1instance *here;
}
return(OK);
}

View File

@ -128,7 +128,7 @@ int ByPass, Check, ChargeComputationNeeded = 0, error;
for (; model != NULL; model = model->BSIM3v1nextModel)
{ for (here = model->BSIM3v1instances; here != NULL;
here = here->BSIM3v1nextInstance)
{
{
Check = 1;
ByPass = 0;
pParam = here->pParam;

View File

@ -127,7 +127,7 @@ int i;
for (; model != NULL; model = model->BSIM3v1nextModel)
{ for (here = model->BSIM3v1instances; here != NULL;
here = here->BSIM3v1nextInstance)
{
{
pParam = here->pParam;
switch (operation)
{ case N_OPEN:

View File

@ -778,9 +778,9 @@ IFuid tmpName;
for (here = model->BSIM3v1instances; here != NULL ;
here=here->BSIM3v1nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM3v1states = *states;
*states += BSIM3v1numStates;
/* allocate a chunk of the state vector */
here->BSIM3v1states = *states;
*states += BSIM3v1numStates;
/* perform the parameter defaulting */
if(here->BSIM3v1m == 0.0)

View File

@ -91,7 +91,7 @@ int Size_Not_Found;
/* MCJ: Length and Width not initialized */
for (here = model->BSIM3v1instances; here != NULL;
here = here->BSIM3v1nextInstance)
{
{
pSizeDependParamKnot = model->pSizeDependParamKnot;
Size_Not_Found = 1;
while ((pSizeDependParamKnot != NULL) && Size_Not_Found)

View File

@ -47,6 +47,3 @@ BSIM3v1instance *here;
}
return(OK);
}

View File

@ -18,7 +18,7 @@ typedef struct sBSIM3v1instance
{
struct sBSIM3v1model *BSIM3v1modPtr;
struct sBSIM3v1instance *BSIM3v1nextInstance;
IFuid BSIM3v1name;
IFuid BSIM3v1name;
int BSIM3v1states; /* index into state table for this device */
int BSIM3v1dNode;

View File

@ -23,7 +23,7 @@ BSIM3v32instance *here;
for (; model ; model = model->BSIM3v32nextModel)
{ for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance)
{
{
if (!here->BSIM3v32icVBSGiven)
{ here->BSIM3v32icVBS = *(ckt->CKTrhs + here->BSIM3v32bNode)
- *(ckt->CKTrhs + here->BSIM3v32sNode);

View File

@ -896,9 +896,9 @@ IFuid tmpName;
for (here = model->BSIM3v32instances; here != NULL ;
here=here->BSIM3v32nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM3v32states = *states;
*states += BSIM3v32numStates;
/* allocate a chunk of the state vector */
here->BSIM3v32states = *states;
*states += BSIM3v32numStates;
/* perform the parameter defaulting */
if (!here->BSIM3v32drainAreaGiven)

View File

@ -2176,9 +2176,10 @@ BSIM4instance **InstArray;
for (here = model->BSIM4instances; here != NULL ;
here=here->BSIM4nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM4states = *states;
*states += BSIM4numStates;
/* allocate a chunk of the state vector */
here->BSIM4states = *states;
*states += BSIM4numStates;
/* perform the parameter defaulting */
if (!here->BSIM4lGiven)
here->BSIM4l = 5.0e-6;

View File

@ -43,7 +43,7 @@ double tol0, tol1, tol2, tol3, tol4, tol5, tol6;
{ for (here = model->BSIM4v4instances; here != NULL ;
here=here->BSIM4v4nextInstance)
{
vds = model->BSIM4v4type
vds = model->BSIM4v4type
* (*(ckt->CKTrhsOld + here->BSIM4v4dNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime));
vgs = model->BSIM4v4type

View File

@ -1626,9 +1626,11 @@ JOB *job;
for (here = model->BSIM4v4instances; here != NULL ;
here=here->BSIM4v4nextInstance)
{ /* allocate a chunk of the state vector */
{
/* allocate a chunk of the state vector */
here->BSIM4v4states = *states;
*states += BSIM4v4numStates;
/* perform the parameter defaulting */
if (!here->BSIM4v4lGiven)
here->BSIM4v4l = 5.0e-6;

View File

@ -42,8 +42,8 @@ double tol0, tol1, tol2, tol3, tol4, tol5, tol6;
for (; model != NULL; model = model->BSIM4v5nextModel)
{ for (here = model->BSIM4v5instances; here != NULL ;
here=here->BSIM4v5nextInstance)
{
vds = model->BSIM4v5type
{
vds = model->BSIM4v5type
* (*(ckt->CKTrhsOld + here->BSIM4v5dNodePrime)
- *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime));
vgs = model->BSIM4v5type

View File

@ -1654,9 +1654,10 @@ JOB *job;
for (here = model->BSIM4v5instances; here != NULL ;
here=here->BSIM4v5nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM4v5states = *states;
*states += BSIM4v5numStates;
/* allocate a chunk of the state vector */
here->BSIM4v5states = *states;
*states += BSIM4v5numStates;
/* perform the parameter defaulting */
if (!here->BSIM4v5lGiven)
here->BSIM4v5l = 5.0e-6;

View File

@ -32,6 +32,7 @@ BSIM4v5instance *here;
{ for (here = model->BSIM4v5instances; here != NULL;
here = here->BSIM4v5nextInstance)
{
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */

View File

@ -2025,9 +2025,10 @@ BSIM4v6instance **InstArray;
for (here = model->BSIM4v6instances; here != NULL ;
here=here->BSIM4v6nextInstance)
{
/* allocate a chunk of the state vector */
here->BSIM4v6states = *states;
*states += BSIM4v6numStates;
/* allocate a chunk of the state vector */
here->BSIM4v6states = *states;
*states += BSIM4v6numStates;
/* perform the parameter defaulting */
if (!here->BSIM4v6lGiven)
here->BSIM4v6l = 5.0e-6;

View File

@ -34,6 +34,7 @@ BSIM4v6instance *here;
{ for (here = model->BSIM4v6instances; here != NULL;
here = here->BSIM4v6nextInstance)
{
#ifdef STEPDEBUG
debugtemp = *timeStep;
#endif /* STEPDEBUG */

View File

@ -34,4 +34,3 @@ CAPgetic(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -41,4 +41,3 @@ CAPsSetup(SENstruct *info, GENmodel *inModel)
}
return(OK);
}

View File

@ -31,7 +31,7 @@ CCCSload(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the instances of the model */
for (here = model->CCCSinstances; here != NULL ;
here=here->CCCSnextInstance) {
*(here->CCCSposContBrptr) += here->CCCScoeff ;
*(here->CCCSnegContBrptr) -= here->CCCScoeff ;
}

View File

@ -33,7 +33,7 @@ CCCSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* loop through all the instances of the model */
for (here = model->CCCSinstances; here != NULL ;
here=here->CCCSnextInstance) {
*(here->CCCSposContBrptr) += here->CCCScoeff ;
*(here->CCCSnegContBrptr) -= here->CCCScoeff ;
}

View File

@ -31,7 +31,7 @@ CCCSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the instances of the model */
for (here = model->CCCSinstances; here != NULL ;
here=here->CCCSnextInstance) {
if(here->CCCSsenParmNo){
ic = *(ckt->CKTrhsOld + here->CCCScontBranch);
@ -49,4 +49,3 @@ CCCSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -38,4 +38,3 @@ CCCSsSetup(SENstruct *info, GENmodel *inModel)
}
return(OK);
}

View File

@ -43,5 +43,3 @@ CCVSsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -39,4 +39,3 @@ CCVSsLoad(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -47,4 +47,3 @@ CCVSsPrint(GENmodel *inModel, CKTcircuit *ckt)
}
}
}

View File

@ -36,4 +36,3 @@ CCVSsSetup(SENstruct *info, GENmodel *inModel)
}
return(OK);
}

View File

@ -43,4 +43,3 @@ DIOsSetup(SENstruct *info, GENmodel *inModel)
}
return(OK);
}

View File

@ -1,4 +1,3 @@
#ifndef HFET2
#define HFET2

View File

@ -80,7 +80,7 @@ INDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 2 * (ckt->CKTsenInfo->SENparms);
}
if(here->INDbrEq == 0) {
error = CKTmkCur(ckt,&tmp,here->INDname,"branch");
if(error) return(error);

View File

@ -92,12 +92,13 @@ MOS1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
for (here = model->MOS1instances; here != NULL ;
here=here->MOS1nextInstance) {
/* allocate a chunk of the state vector */
here->MOS1states = *states;
*states += MOS1numStates;
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 10 * (ckt->CKTsenInfo->SENparms);
}
/* allocate a chunk of the state vector */
here->MOS1states = *states;
*states += MOS1numStates;
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 10 * (ckt->CKTsenInfo->SENparms);
}
if(!here->MOS1drainPerimiterGiven) {
here->MOS1drainPerimiter = 0;

View File

@ -36,7 +36,7 @@ MOS2acLoad(GENmodel *inModel, CKTcircuit *ckt)
for( ; model != NULL; model = model->MOS2nextModel) {
for(here = model->MOS2instances; here!= NULL;
here = here->MOS2nextInstance) {
if (here->MOS2mode < 0) {
xnrm=0;
xrev=1;

View File

@ -32,7 +32,7 @@ MOS2convTest(GENmodel *inModel, CKTcircuit *ckt)
for( ; model != NULL; model = model->MOS2nextModel) {
for(here = model->MOS2instances; here!= NULL;
here = here->MOS2nextInstance) {
vbs = model->MOS2type * (
*(ckt->CKTrhs+here->MOS2bNode) -
*(ckt->CKTrhs+here->MOS2sNodePrime));

View File

@ -24,7 +24,7 @@ MOS2getic(GENmodel *inModel, CKTcircuit *ckt)
for( ; model ; model = model->MOS2nextModel) {
for(here = model->MOS2instances; here ; here = here->MOS2nextInstance) {
if(!here->MOS2icVBSGiven) {
here->MOS2icVBS =
*(ckt->CKTrhs + here->MOS2bNode) -

View File

@ -49,7 +49,7 @@ MOS2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
for (model=firstModel; model != NULL; model=model->MOS2nextModel) {
for (inst=model->MOS2instances; inst != NULL; inst=inst->MOS2nextInstance) {
switch (operation) {
case N_OPEN:

View File

@ -37,7 +37,7 @@ MOS2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
for( ; model != NULL; model = model->MOS2nextModel) {
for(here = model->MOS2instances; here!= NULL;
here = here->MOS2nextInstance) {
if (here->MOS2mode < 0) {
xnrm=0;
xrev=1;

View File

@ -124,12 +124,13 @@ MOS2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
CKTnode *tmpNode;
IFuid tmpName;
/* allocate a chunk of the state vector */
here->MOS2states = *states;
*states += MOS2numStates;
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 10 * (ckt->CKTsenInfo->SENparms);
}
/* allocate a chunk of the state vector */
here->MOS2states = *states;
*states += MOS2numStates;
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 10 * (ckt->CKTsenInfo->SENparms);
}
if(!here->MOS2drainPerimiterGiven) {
here->MOS2drainPerimiter = 0;

View File

@ -20,7 +20,7 @@ MOS2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
for( ; model != NULL; model = model->MOS2nextModel) {
for(here=model->MOS2instances;here!=NULL;here = here->MOS2nextInstance){
CKTterr(here->MOS2qgs,ckt,timeStep);
CKTterr(here->MOS2qgd,ckt,timeStep);
CKTterr(here->MOS2qgb,ckt,timeStep);

View File

@ -147,9 +147,9 @@ MOS3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
CKTnode *tmpNode;
IFuid tmpName;
/* allocate a chunk of the state vector */
here->MOS3states = *states;
*states += MOS3NUMSTATES;
/* allocate a chunk of the state vector */
here->MOS3states = *states;
*states += MOS3NUMSTATES;
if(!here->MOS3drainAreaGiven) {
here->MOS3drainArea = ckt->CKTdefaultMosAD;

View File

@ -147,9 +147,10 @@ MOS9setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
CKTnode *tmpNode;
IFuid tmpName;
/* allocate a chunk of the state vector */
here->MOS9states = *states;
*states += MOS9NUMSTATES;
/* allocate a chunk of the state vector */
here->MOS9states = *states;
*states += MOS9NUMSTATES;
if(!here->MOS9drainAreaGiven) {
here->MOS9drainArea = ckt->CKTdefaultMosAD;
}

View File

@ -24,8 +24,7 @@ int NDEVaccept(CKTcircuit *ckt, GENmodel *inModel)
{
/* loop through all the instances of the model */
for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance)
{
{
/* set ckt accept_flag */
here->CKTInfo.DEV_CALL = NDEV_ACCEPT;
here->CKTInfo.CKTmode = ckt->CKTmode;
@ -48,6 +47,7 @@ int NDEVconvTest(GENmodel *inModel, CKTcircuit *ckt)
for( ; model != NULL; model = model->NDEVnextModel) {
for(here=model->NDEVinstances;here!=NULL;here = here->NDEVnextInstance){
/*
* get convergence information from ndev
*/

View File

@ -28,7 +28,7 @@ NDEVload(GENmodel * inModel, CKTcircuit * ckt)
/* loop through all the instances of the model */
for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance)
{
{
/* sent ckt information to device simulator */
here->CKTInfo.DEV_CALL = NDEV_LOAD;
here->CKTInfo.CKTmode = ckt->CKTmode;
@ -55,7 +55,7 @@ NDEVload(GENmodel * inModel, CKTcircuit * ckt)
/* loop through all the instances of the model */
for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance)
{
{
/* reveive terminal current and conductional matrix from device simulator */
for(i=0;i<here->term;i++)
{
@ -98,5 +98,3 @@ int NDEVgetic(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -245,6 +245,7 @@ NUMD2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\
return(E_NOMEM);\
}
TSTALLOC(NUMD2posPosPtr, NUMD2posNode, NUMD2posNode)
TSTALLOC(NUMD2negNegPtr, NUMD2negNode, NUMD2negNode)
TSTALLOC(NUMD2negPosPtr, NUMD2negNode, NUMD2posNode)

View File

@ -75,7 +75,7 @@ RESacload(GENmodel *inModel, CKTcircuit *ckt)
if(!here->REStc1Given) here->REStc1 = 0.0;
if(!here->REStc2Given) here->REStc2 = 0.0;
if(!here->RESmGiven) here->RESm = 1.0;
difference = (here->REStemp + here->RESdtemp) - 300.15;
factor = 1.0 + (here->REStc1)*difference +
(here->REStc2)*difference*difference;

View File

@ -56,7 +56,7 @@ RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
for (model = firstModel; model != NULL; model = model->RESnextModel) {
for (inst = model->RESinstances; inst != NULL;
inst = inst->RESnextInstance) {
if(!inst->RESnoisy) continue; /* Quiet resistors are skipped */
switch (operation) {

View File

@ -32,7 +32,7 @@ RESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
/* loop through all the instances of the model */
for (here = model->RESinstances; here != NULL ;
here=here->RESnextInstance) {
m = here->RESm;
*(here->RESposPosptr) += m * here->RESconduct;

View File

@ -33,12 +33,14 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
* Paolo Nenzi 2003
* The following lines are needed if I will move the defaulting code
* from REStemp to RESsetup, as in other (more recent ?) spice devices
*
*
* ------------------------------------------LEGACY CODE - Francesco Lannutti - October 22, 2012
* if (here->RESowner != ARCHme)
* goto matrixpointers;
*
*
* matrixpointers:
*
* ------------------------------------------
*
* put here instance parameter defaulting.
*/

View File

@ -48,4 +48,3 @@ RESsLoad(GENmodel *inModel, CKTcircuit *ckt)
}
return(OK);
}

View File

@ -42,7 +42,7 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the instances of the model */
for (here = model->RESinstances; here != NULL ;
here=here->RESnextInstance) {
/* Default Value Processing for Resistor Instance */
if(!here->REStempGiven) {

View File

@ -325,9 +325,9 @@ SOI3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
here->SOI3gMd = 0.0;
here->SOI3gMdeltaT = 0.0;
/* allocate a chunk of the state vector */
here->SOI3states = *states;
*states += SOI3numStates;
/* allocate a chunk of the state vector */
here->SOI3states = *states;
*states += SOI3numStates;
/* if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){
*states += 10 * (ckt->CKTsenInfo->SENparms);
}

Some files were not shown because too many files have changed in this diff Show More