devices/**/*defs*.h, use a struct GENinstance slot
This commit is contained in:
parent
bc84b06b24
commit
43dacbc1bf
|
|
@ -52,10 +52,12 @@ NON-STANDARD FEATURES
|
|||
|
||||
struct MIFinstance {
|
||||
|
||||
struct MIFmodel *MIFmodPtr; /* backpointer to model */
|
||||
struct MIFinstance *MIFnextInstance; /* pointer to next instance of current model */
|
||||
IFuid MIFname; /* pointer to character string naming this instance */
|
||||
int MIFstates; /* state info, unused */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define MIFmodPtr(inst) ((struct MIFmodel*)((inst)->gen.GENmodPtr))
|
||||
#define MIFnextInstance(inst) ((struct MIFinstance*)((inst)->gen.GENnextInstance))
|
||||
#define MIFname gen.GENname
|
||||
#define MIFstates gen.GENstate
|
||||
|
||||
int num_conn; /* number of connections on the code model */
|
||||
Mif_Conn_Data_t **conn; /* array of data structures for each connection */
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ CKTdisto (CKTcircuit *ckt, int mode)
|
|||
for(model = (VSRCmodel *)ckt->CKThead[vcode];model != NULL;
|
||||
model=VSRCnextModel(model)){
|
||||
for(here=VSRCinstances(model);here!=NULL;
|
||||
here=here->VSRCnextInstance) {
|
||||
here=VSRCnextInstance(here)) {
|
||||
|
||||
/* check if the source has a distortion input*/
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ if (((here->VSRCdF1given) && (mode == D_RHSF1)) ||
|
|||
for(model= (ISRCmodel *)ckt->CKThead[icode];model != NULL;
|
||||
model=ISRCnextModel(model)){
|
||||
for(here=ISRCinstances(model);here!=NULL;
|
||||
here=here->ISRCnextInstance) {
|
||||
here=ISRCnextInstance(here)) {
|
||||
|
||||
/* check if the source has a distortion input*/
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
RESmodel *model;
|
||||
|
||||
for (model = (RESmodel *)ckt->CKThead[rcode]; model; model = RESnextModel(model))
|
||||
for (here = RESinstances(model); here; here = here->RESnextInstance)
|
||||
for (here = RESinstances(model); here; here = RESnextInstance(here))
|
||||
if (here->RESname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->RESresist;
|
||||
|
|
@ -110,7 +110,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
VSRCmodel *model;
|
||||
|
||||
for (model = (VSRCmodel *)ckt->CKThead[vcode]; model; model = VSRCnextModel(model))
|
||||
for (here = VSRCinstances(model); here; here = here->VSRCnextInstance)
|
||||
for (here = VSRCinstances(model); here; here = VSRCnextInstance(here))
|
||||
if (here->VSRCname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->VSRCdcValue;
|
||||
|
|
@ -128,7 +128,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
ISRCmodel *model;
|
||||
|
||||
for (model = (ISRCmodel *)ckt->CKThead[icode]; model; model = ISRCnextModel(model))
|
||||
for (here = ISRCinstances(model); here; here = here->ISRCnextInstance)
|
||||
for (here = ISRCinstances(model); here; here = ISRCnextInstance(here))
|
||||
if (here->ISRCname == job->TRCVvName[i]) {
|
||||
job->TRCVvElt[i] = (GENinstance *)here;
|
||||
job->TRCVvSave[i] = here->ISRCdcValue;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double rhs;
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
i = here->ASRCtree->numVars;
|
||||
if (asrc_nvals < i) {
|
||||
|
|
|
|||
|
|
@ -18,11 +18,13 @@ Author: 1985 Thomas L. Quarles
|
|||
/* information to describe a single instance */
|
||||
|
||||
typedef struct sASRCinstance {
|
||||
struct sASRCmodel *ASRCmodPtr; /* backpointer to model */
|
||||
struct sASRCinstance *ASRCnextInstance; /* pointer to next instance of
|
||||
* current model */
|
||||
IFuid ASRCname; /* pointer to character string naming this instance */
|
||||
int ASRCstates; /* state info */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define ASRCmodPtr(inst) ((struct sASRCmodel*)((inst)->gen.GENmodPtr))
|
||||
#define ASRCnextInstance(inst) ((struct sASRCinstance*)((inst)->gen.GENnextInstance))
|
||||
#define ASRCname gen.GENname
|
||||
#define ASRCstates gen.GENstate
|
||||
|
||||
const int ASRCposNode; /* number of positive node of source */
|
||||
const int ASRCnegNode; /* number of negative node of source */
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ ASRCdestroy(GENmodel **inModel)
|
|||
ASRCmodel *next_mod = ASRCnextModel(mod);
|
||||
ASRCinstance *inst = ASRCinstances(mod);
|
||||
while (inst) {
|
||||
ASRCinstance *next_inst = inst->ASRCnextInstance;
|
||||
ASRCinstance *next_inst = ASRCnextInstance(inst);
|
||||
INPfreeTree(inst->ASRCtree);
|
||||
FREE(inst->ASRCacValues);
|
||||
FREE(inst->ASRCposPtr);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ ASRCfindBr(CKTcircuit *ckt, GENmodel *inputModel, IFuid name)
|
|||
CKTnode *tmp;
|
||||
|
||||
for (; model; model = ASRCnextModel(model))
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance)
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here))
|
||||
if (here->ASRCname == name) {
|
||||
if (here->ASRCbranch == 0) {
|
||||
error = CKTmkCur(ckt, &tmp, here->ASRCname, "branch");
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ ASRCload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double factor;
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here=here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here=ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
NG_IGNORE(s);
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15;
|
||||
factor = 1.0
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
NG_IGNORE(states);
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here=here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here=ASRCnextInstance(here)) {
|
||||
|
||||
if (!here->ASRCtree)
|
||||
return E_PARMVAL;
|
||||
|
|
@ -127,7 +127,7 @@ ASRCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ASRCinstance *here;
|
||||
|
||||
for (; model; model = ASRCnextModel(model))
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
if (here->ASRCbranch > 0)
|
||||
CKTdltNNum(ckt, here->ASRCbranch);
|
||||
here->ASRCbranch = 0;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
ASRCinstance *here;
|
||||
|
||||
for (; model; model = ASRCnextModel(model)) {
|
||||
for (here = ASRCinstances(model); here; here = here->ASRCnextInstance) {
|
||||
for (here = ASRCinstances(model); here; here = ASRCnextInstance(here)) {
|
||||
|
||||
/* Default Value Processing for Source Instance */
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ BJTacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
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)) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ BJTconvTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for(here=BJTinstances(model);here!=NULL;here = here->BJTnextInstance){
|
||||
for(here=BJTinstances(model);here!=NULL;here = BJTnextInstance(here)){
|
||||
|
||||
vbe=model->BJTtype*(
|
||||
*(ckt->CKTrhsOld+here->BJTbasePrimeNode)-
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@ Author: 1985 Thomas L. Quarles
|
|||
/* data needed to describe a single instance */
|
||||
|
||||
typedef struct sBJTinstance {
|
||||
struct sBJTmodel *BJTmodPtr; /* backpointer to model */
|
||||
struct sBJTinstance *BJTnextInstance; /* pointer to next instance of
|
||||
* current model*/
|
||||
IFuid BJTname; /* pointer to character string naming this instance */
|
||||
int BJTstate; /* pointer to start of state vector for bjt */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define BJTmodPtr(inst) ((struct sBJTmodel*)((inst)->gen.GENmodPtr))
|
||||
#define BJTnextInstance(inst) ((struct sBJTinstance*)((inst)->gen.GENnextInstance))
|
||||
#define BJTname gen.GENname
|
||||
#define BJTstate gen.GENstate
|
||||
|
||||
const int BJTcolNode; /* number of collector node of bjt */
|
||||
const int BJTbaseNode; /* number of base node of bjt */
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ BJTdestroy(GENmodel **inModel)
|
|||
BJTmodel *next_mod = BJTnextModel(mod);
|
||||
BJTinstance *inst = BJTinstances(mod);
|
||||
while (inst) {
|
||||
BJTinstance *next_inst = inst->BJTnextInstance;
|
||||
BJTinstance *next_inst = BJTnextInstance(inst);
|
||||
FREE(inst->BJTsens);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ BJTdisto(int mode, GENmodel *genmodel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
/* getting Volterra kernels */
|
||||
/* until further notice x = vbe, y = vbc, z= vbed */
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ int BJTdSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
vt = here->BJTtemp * CONSTKoverQ;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ BJTgetic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*/
|
||||
|
||||
for( ; model ; model = BJTnextModel(model)) {
|
||||
for(here = BJTinstances(model); here ; here = here->BJTnextInstance) {
|
||||
for(here = BJTinstances(model); here ; here = BJTnextInstance(here)) {
|
||||
|
||||
if(!here->BJTicVBEGiven) {
|
||||
here->BJTicVBE =
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ BJTload(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
vt = here->BJTtemp * CONSTKoverQ;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ BJTnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
|
||||
for (model=firstModel; model != NULL; model=BJTnextModel(model)) {
|
||||
for (inst=BJTinstances(model); inst != NULL;
|
||||
inst=inst->BJTnextInstance) {
|
||||
inst=BJTnextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BJTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
here = BJTnextInstance(here)) {
|
||||
|
||||
m = here->BJTm;
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ BJTsAcLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
|
||||
/* save the unperturbed values in the state vector */
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
||||
|
|
@ -479,7 +479,7 @@ BJTunsetup(
|
|||
model = BJTnextModel(model))
|
||||
{
|
||||
for (here = BJTinstances(model); here != NULL;
|
||||
here=here->BJTnextInstance)
|
||||
here=BJTnextInstance(here))
|
||||
{
|
||||
if (here->BJTemitPrimeNode > 0
|
||||
&& here->BJTemitPrimeNode != here->BJTemitNode)
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ BJTsLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
printf("base = %d , baseprm = %d ,col = %d, colprm = %d\n",
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ BJTsoaCheck(CKTcircuit *ckt, GENmodel *inModel)
|
|||
|
||||
for (; model; model = BJTnextModel(model)) {
|
||||
|
||||
for (here = BJTinstances(model); here; here=here->BJTnextInstance) {
|
||||
for (here = BJTinstances(model); here; here=BJTnextInstance(here)) {
|
||||
|
||||
vbe = fabs(ckt->CKTrhsOld [here->BJTbasePrimeNode] -
|
||||
ckt->CKTrhsOld [here->BJTemitPrimeNode]);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ BJTsPrint(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
ckt->CKTsenInfo->SEN_parmVal[here->BJTsenParmNo] = here->BJTarea;
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BJTsSetup(SENstruct *info, GENmodel *inModel)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
if(here->BJTsenParmNo){
|
||||
here->BJTsenParmNo = ++(info->SENparms);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ BJTsUpdate(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
sxpbe = 0;
|
||||
sxpbc = 0;
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
here=BJTnextInstance(here)) {
|
||||
|
||||
double arg1, pbfact1, egfet1;
|
||||
if(!here->BJTdtempGiven)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ BJTtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
BJTinstance *here;
|
||||
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for(here=BJTinstances(model);here!=NULL;here = here->BJTnextInstance){
|
||||
for(here=BJTinstances(model);here!=NULL;here = BJTnextInstance(here)){
|
||||
|
||||
CKTterr(here->BJTqbe,ckt,timeStep);
|
||||
CKTterr(here->BJTqbc,ckt,timeStep);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ B1acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
here = B1nextInstance(here)) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ B1convTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
vbs = model->B1type * (
|
||||
*(ckt->CKTrhsOld+here->B1bNode) -
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ B1destroy(GENmodel **inModel)
|
|||
B1model *next_mod = B1nextModel(mod);
|
||||
B1instance *inst = B1instances(mod);
|
||||
while (inst) {
|
||||
B1instance *next_inst = inst->B1nextInstance;
|
||||
B1instance *next_inst = B1nextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ for( ; model != NULL; model = B1nextModel(model) ) {
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
/* loading starts here */
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ B1dSetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B1m * here->B1drainArea;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B1getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*/
|
||||
|
||||
for( ; model ; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here ; here = here->B1nextInstance) {
|
||||
for(here = B1instances(model); here ; here = B1nextInstance(here)) {
|
||||
|
||||
if(!here->B1icVBSGiven) {
|
||||
here->B1icVBS =
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ B1load(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B1drainArea;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ B1noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
};
|
||||
|
||||
for (model=firstModel; model != NULL; model=B1nextModel(model)) {
|
||||
for (inst=B1instances(model); inst != NULL; inst=inst->B1nextInstance) {
|
||||
for (inst=B1instances(model); inst != NULL; inst=B1nextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ B1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
here = B1nextInstance(here)) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
|
@ -410,7 +410,7 @@ B1unsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
model = B1nextModel(model))
|
||||
{
|
||||
for (here = B1instances(model); here != NULL;
|
||||
here=here->B1nextInstance)
|
||||
here=B1nextInstance(here))
|
||||
{
|
||||
if (here->B1sNodePrime > 0
|
||||
&& here->B1sNodePrime != here->B1sNode)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ B1temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
here=B1nextInstance(here)) {
|
||||
|
||||
if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) {
|
||||
SPfrontEnd->IFerrorf (ERR_FATAL,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ B1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
#endif /* STEPDEBUG */
|
||||
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here=B1instances(model);here!=NULL;here = here->B1nextInstance){
|
||||
for(here=B1instances(model);here!=NULL;here = B1nextInstance(here)){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -20,11 +20,12 @@ Author: 1985 Hong June Park, Thomas L. Quarles
|
|||
/* information needed for each instance */
|
||||
|
||||
typedef struct sBSIM1instance {
|
||||
struct sBSIM1model *B1modPtr; /* pointer to model */
|
||||
struct sBSIM1instance *B1nextInstance; /* pointer to next instance of
|
||||
*current model*/
|
||||
IFuid B1name; /* pointer to character string naming this instance */
|
||||
int B1states; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define B1modPtr(inst) ((struct sBSIM1model*)((inst)->gen.GENmodPtr))
|
||||
#define B1nextInstance(inst) ((struct sBSIM1instance*)((inst)->gen.GENnextInstance))
|
||||
#define B1name gen.GENname
|
||||
#define B1states gen.GENstate
|
||||
|
||||
const int B1dNode; /* number of the gate node of the mosfet */
|
||||
const int B1gNode; /* number of the gate node of the mosfet */
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ B2acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
here = B2nextInstance(here)) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ B2convTest(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
vbs = model->B2type * (
|
||||
*(ckt->CKTrhsOld+here->B2bNode) -
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ B2destroy(GENmodel **inModel)
|
|||
B2model *next_mod = B2nextModel(mod);
|
||||
B2instance *inst = B2instances(mod);
|
||||
while (inst) {
|
||||
B2instance *next_inst = inst->B2nextInstance;
|
||||
B2instance *next_inst = B2nextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B2getic(GENmodel *inModel, CKTcircuit *ckt)
|
|||
*/
|
||||
|
||||
for( ; model ; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here ; here = here->B2nextInstance) {
|
||||
for(here = B2instances(model); here ; here = B2nextInstance(here)) {
|
||||
|
||||
if(!here->B2icVBSGiven) {
|
||||
here->B2icVBS =
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ B2load(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
EffectiveLength=here->B2l - model->B2deltaL * 1.e-6;/* m */
|
||||
DrainArea = here->B2drainArea;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ B2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
|
|||
};
|
||||
|
||||
for (model=firstModel; model != NULL; model=B2nextModel(model)) {
|
||||
for (inst=B2instances(model); inst != NULL; inst=inst->B2nextInstance) {
|
||||
for (inst=B2instances(model); inst != NULL; inst=B2nextInstance(inst)) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ B2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
here = B2nextInstance(here)) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
xnrm=1;
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B2states = *states;
|
||||
|
|
@ -579,7 +579,7 @@ B2unsetup(
|
|||
model = B2nextModel(model))
|
||||
{
|
||||
for (here = B2instances(model); here != NULL;
|
||||
here=here->B2nextInstance)
|
||||
here=B2nextInstance(here))
|
||||
{
|
||||
if (here->B2sNodePrime > 0
|
||||
&& here->B2sNodePrime != here->B2sNode)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
here=B2nextInstance(here)) {
|
||||
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ B2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
|||
#endif /* STEPDEBUG */
|
||||
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here=B2instances(model);here!=NULL;here = here->B2nextInstance){
|
||||
for(here=B2instances(model);here!=NULL;here = B2nextInstance(here)){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@ Author: 1988 Min-Chie Jeng, Hong June Park, Thomas L. Quarles
|
|||
/* information needed for each instance */
|
||||
|
||||
typedef struct sBSIM2instance {
|
||||
struct sBSIM2model *B2modPtr; /* pointer to model */
|
||||
struct sBSIM2instance *B2nextInstance; /* pointer to next instance of
|
||||
*current model*/
|
||||
IFuid B2name; /* pointer to character string naming this instance */
|
||||
int B2states; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define B2modPtr(inst) ((struct sBSIM2model*)((inst)->gen.GENmodPtr))
|
||||
#define B2nextInstance(inst) ((struct sBSIM2instance*)((inst)->gen.GENnextInstance))
|
||||
#define B2name gen.GENname
|
||||
#define B2states gen.GENstate
|
||||
|
||||
const int B2dNode; /* number of the gate node of the mosfet */
|
||||
const int B2gNode; /* number of the gate node of the mosfet */
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ double m;
|
|||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
Csd = -(here->BSIM3cddb + here->BSIM3cgdb + here->BSIM3cbdb);
|
||||
Csg = -(here->BSIM3cdgb + here->BSIM3cggb + here->BSIM3cbgb);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
vbs = model->BSIM3type
|
||||
* (*(ckt->CKTrhsOld+here->BSIM3bNode)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ BSIM3destroy(GENmodel **inModel)
|
|||
/** end of extra code **/
|
||||
|
||||
while (inst) {
|
||||
BSIM3instance *next_inst = inst->BSIM3nextInstance;
|
||||
BSIM3instance *next_inst = BSIM3nextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ BSIM3model *model = (BSIM3model*)inModel;
|
|||
BSIM3instance *here;
|
||||
|
||||
for (; model ; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here; here = here->BSIM3nextInstance)
|
||||
{ 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;
|
||||
|
|
@ -181,7 +181,7 @@ ChargeComputationNeeded =
|
|||
#ifndef USE_OMP
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ int i;
|
|||
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
here = BSIM3nextInstance(here))
|
||||
{ pParam = here->pParam;
|
||||
switch (operation)
|
||||
{ case N_OPEN:
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3mode >= 0)
|
||||
{ Gm = here->BSIM3gm;
|
||||
|
|
|
|||
|
|
@ -921,7 +921,7 @@ BSIM3instance **InstArray;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->BSIM3states = *states;
|
||||
|
|
@ -1133,7 +1133,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
InstCount++;
|
||||
}
|
||||
|
|
@ -1145,7 +1145,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
{
|
||||
/* loop through all the instances of the model */
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
idx++;
|
||||
|
|
@ -1171,7 +1171,7 @@ BSIM3unsetup(
|
|||
model = BSIM3nextModel(model))
|
||||
{
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here=here->BSIM3nextInstance)
|
||||
here=BSIM3nextInstance(here))
|
||||
{
|
||||
if (here->BSIM3qNode > 0)
|
||||
CKTdltNNum(ckt, here->BSIM3qNode);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ BSIM3soaCheck(CKTcircuit *ckt, GENmodel *inModel)
|
|||
|
||||
for (; model; model = BSIM3nextModel(model)) {
|
||||
|
||||
for (here = BSIM3instances(model); here; here = here->BSIM3nextInstance) {
|
||||
for (here = BSIM3instances(model); here; here = BSIM3nextInstance(here)) {
|
||||
|
||||
vgs = ckt->CKTrhsOld [here->BSIM3gNode] -
|
||||
ckt->CKTrhsOld [here->BSIM3sNodePrime];
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int Size_Not_Found, error;
|
|||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
Size_Not_Found = 1;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ BSIM3instance *here;
|
|||
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
here = BSIM3nextInstance(here))
|
||||
{
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -18,10 +18,13 @@ File: bsim3def.h
|
|||
|
||||
typedef struct sBSIM3instance
|
||||
{
|
||||
struct sBSIM3model *BSIM3modPtr;
|
||||
struct sBSIM3instance *BSIM3nextInstance;
|
||||
IFuid BSIM3name;
|
||||
int BSIM3states; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define BSIM3modPtr(inst) ((struct sBSIM3model*)((inst)->gen.GENmodPtr))
|
||||
#define BSIM3nextInstance(inst) ((struct sBSIM3instance*)((inst)->gen.GENnextInstance))
|
||||
#define BSIM3name gen.GENname
|
||||
#define BSIM3states gen.GENstate
|
||||
|
||||
const int BSIM3dNode;
|
||||
const int BSIM3gNode;
|
||||
const int BSIM3sNode;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ double m;
|
|||
{
|
||||
|
||||
for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
if (here->B3SOIDDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIDDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIDDbNode)
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ Modified by Paolo Nenzi 2002
|
|||
|
||||
typedef struct sB3SOIDDinstance
|
||||
{
|
||||
struct sB3SOIDDmodel *B3SOIDDmodPtr;
|
||||
struct sB3SOIDDinstance *B3SOIDDnextInstance;
|
||||
IFuid B3SOIDDname;
|
||||
int B3SOIDDstates; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define B3SOIDDmodPtr(inst) ((struct sB3SOIDDmodel*)((inst)->gen.GENmodPtr))
|
||||
#define B3SOIDDnextInstance(inst) ((struct sB3SOIDDinstance*)((inst)->gen.GENnextInstance))
|
||||
#define B3SOIDDname gen.GENname
|
||||
#define B3SOIDDstates gen.GENstate
|
||||
|
||||
const int B3SOIDDdNode;
|
||||
const int B3SOIDDgNode;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIDDdestroy(GENmodel **inModel)
|
|||
B3SOIDDmodel *next_mod = B3SOIDDnextModel(mod);
|
||||
B3SOIDDinstance *inst = B3SOIDDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIDDinstance *next_inst = inst->B3SOIDDnextInstance;
|
||||
B3SOIDDinstance *next_inst = B3SOIDDnextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIDDmodel *model = (B3SOIDDmodel*)inModel;
|
|||
B3SOIDDinstance *here;
|
||||
|
||||
for (; model ; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here; here = here->B3SOIDDnextInstance)
|
||||
{ for (here = B3SOIDDinstances(model); here; here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIDDicVBSGiven)
|
||||
{ here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode)
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ int i;
|
|||
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
{ Gm = here->B3SOIDDgm;
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ IFuid tmpName;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIDDstates = *states;
|
||||
|
|
@ -1360,7 +1360,7 @@ B3SOIDDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
model = B3SOIDDnextModel(model))
|
||||
{
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
here=B3SOIDDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIDDdum5Node > 0)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ int Size_Not_Found;
|
|||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
|
||||
model->B3SOIDDrbsh;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ B3SOIDDinstance *here;
|
|||
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
here = B3SOIDDnextInstance(here))
|
||||
{
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ double m;
|
|||
{
|
||||
|
||||
for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
if (here->B3SOIFDdebugMod > 2)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIFDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIFDbNode)
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ File: b3soifddef.h
|
|||
|
||||
typedef struct sB3SOIFDinstance
|
||||
{
|
||||
struct sB3SOIFDmodel *B3SOIFDmodPtr;
|
||||
struct sB3SOIFDinstance *B3SOIFDnextInstance;
|
||||
IFuid B3SOIFDname;
|
||||
int B3SOIFDstates; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define B3SOIFDmodPtr(inst) ((struct sB3SOIFDmodel*)((inst)->gen.GENmodPtr))
|
||||
#define B3SOIFDnextInstance(inst) ((struct sB3SOIFDinstance*)((inst)->gen.GENnextInstance))
|
||||
#define B3SOIFDname gen.GENname
|
||||
#define B3SOIFDstates gen.GENstate
|
||||
|
||||
const int B3SOIFDdNode;
|
||||
const int B3SOIFDgNode;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIFDdestroy(GENmodel **inModel)
|
|||
B3SOIFDmodel *next_mod = B3SOIFDnextModel(mod);
|
||||
B3SOIFDinstance *inst = B3SOIFDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIFDinstance *next_inst = inst->B3SOIFDnextInstance;
|
||||
B3SOIFDinstance *next_inst = B3SOIFDnextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIFDmodel *model = (B3SOIFDmodel*)inModel;
|
|||
B3SOIFDinstance *here;
|
||||
|
||||
for (; model ; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here; here = here->B3SOIFDnextInstance)
|
||||
{ for (here = B3SOIFDinstances(model); here; here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIFDicVBSGiven)
|
||||
{ here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode)
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ int i;
|
|||
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
{ Gm = here->B3SOIFDgm;
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ IFuid tmpName;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIFDstates = *states;
|
||||
|
|
@ -1349,7 +1349,7 @@ B3SOIFDunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
model = B3SOIFDnextModel(model))
|
||||
{
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
here=B3SOIFDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIFDdum5Node > 0)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ int Size_Not_Found;
|
|||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
|
||||
model->B3SOIFDrbsh;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ B3SOIFDinstance *here;
|
|||
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
here = B3SOIFDnextInstance(here))
|
||||
{
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ double m;
|
|||
{
|
||||
|
||||
for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs;
|
|||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ /* loop through all the instances of the model */
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
vbs = model->B3SOIPDtype
|
||||
* (*(ckt->CKTrhsOld+here->B3SOIPDbNode)
|
||||
|
|
|
|||
|
|
@ -25,10 +25,12 @@ Modified by Paolo Nenzi 2002
|
|||
|
||||
typedef struct sB3SOIPDinstance
|
||||
{
|
||||
struct sB3SOIPDmodel *B3SOIPDmodPtr;
|
||||
struct sB3SOIPDinstance *B3SOIPDnextInstance;
|
||||
IFuid B3SOIPDname;
|
||||
int B3SOIPDstates; /* index into state table for this device */
|
||||
struct GENinstance gen;
|
||||
|
||||
#define B3SOIPDmodPtr(inst) ((struct sB3SOIPDmodel*)((inst)->gen.GENmodPtr))
|
||||
#define B3SOIPDnextInstance(inst) ((struct sB3SOIPDinstance*)((inst)->gen.GENnextInstance))
|
||||
#define B3SOIPDname gen.GENname
|
||||
#define B3SOIPDstates gen.GENstate
|
||||
|
||||
const int B3SOIPDdNode;
|
||||
const int B3SOIPDgNode;
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIPDdestroy(GENmodel **inModel)
|
|||
B3SOIPDmodel *next_mod = B3SOIPDnextModel(mod);
|
||||
B3SOIPDinstance *inst = B3SOIPDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIPDinstance *next_inst = inst->B3SOIPDnextInstance;
|
||||
B3SOIPDinstance *next_inst = B3SOIPDnextInstance(inst);
|
||||
FREE(inst);
|
||||
inst = next_inst;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ B3SOIPDmodel *model = (B3SOIPDmodel*)inModel;
|
|||
B3SOIPDinstance *here;
|
||||
|
||||
for (; model ; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here; here = here->B3SOIPDnextInstance)
|
||||
{ for (here = B3SOIPDinstances(model); here; here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
if(!here->B3SOIPDicVBSGiven)
|
||||
{ here->B3SOIPDicVBS = *(ckt->CKTrhs + here->B3SOIPDbNode)
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
Check = 0;
|
||||
ByPass = 0;
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ int i;
|
|||
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ double m;
|
|||
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
{ Gm = here->B3SOIPDgm;
|
||||
|
|
|
|||
|
|
@ -1049,7 +1049,7 @@ IFuid tmpName;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
here->B3SOIPDstates = *states;
|
||||
|
|
@ -1464,7 +1464,7 @@ B3SOIPDunsetup(
|
|||
model = B3SOIPDnextModel(model))
|
||||
{
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
here=B3SOIPDnextInstance(here))
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
if (here->B3SOIPDqjdNode > 0)
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ double tmp3, T7;
|
|||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
here = B3SOIPDnextInstance(here))
|
||||
{
|
||||
here->B3SOIPDrbodyext = here->B3SOIPDbodySquares *
|
||||
model->B3SOIPDrbsh;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue