devices/**/*defs*.h, use a struct GENmodule slot
This commit is contained in:
parent
8c4ae60189
commit
9b45dbbbba
|
|
@ -44,6 +44,7 @@ NON-STANDARD FEATURES
|
|||
|
||||
|
||||
#include "ngspice/mifcmdat.h"
|
||||
#include "ngspice/gendefs.h"
|
||||
#include "ngspice/ifsim.h"
|
||||
|
||||
|
||||
|
|
@ -89,12 +90,12 @@ struct MIFinstance {
|
|||
|
||||
struct MIFmodel {
|
||||
|
||||
int MIFmodType; /* type index of this device type */
|
||||
struct MIFmodel *MIFnextModel; /* pointer to next possible model in linked list */
|
||||
struct MIFinstance *MIFinstances; /* pointer to list of instances that have this model */
|
||||
IFuid MIFmodName; /* pointer to character string naming this model */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define MIFmodType gen.GENmodType
|
||||
#define MIFnextModel(inst) ((struct MIFmodel*)((inst)->gen.GENnextModel))
|
||||
#define MIFinstances(inst) ((struct MIFinstance*)((inst)->gen.GENinstances))
|
||||
#define MIFmodName gen.GENmodName
|
||||
|
||||
int num_param; /* number of parameters on the code model */
|
||||
Mif_Param_Data_t **param; /* array of structs for each parameter */
|
||||
|
|
|
|||
|
|
@ -19,12 +19,7 @@ Authors: 1991 David Gates
|
|||
#include "ngspice/carddefs.h"
|
||||
|
||||
typedef struct sGENnumModel { /* model structure for a numerical device */
|
||||
int GENmodType; /* type index of this device type */
|
||||
struct sGENnumModel *GENnextModel; /* pointer to next model in list */
|
||||
GENinstance *GENinstances; /* pointer to list of instances */
|
||||
IFuid GENmodName; /* pointer to string naming this model */
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* Everything below here is numerical-device-specific */
|
||||
MESHcard *GENxMeshes; /* list of xmesh cards */
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ 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;
|
||||
model=VSRCnextModel(model)){
|
||||
for(here=VSRCinstances(model);here!=NULL;
|
||||
here=here->VSRCnextInstance) {
|
||||
|
||||
/* check if the source has a distortion input*/
|
||||
|
|
@ -125,8 +125,8 @@ 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;
|
||||
model=ISRCnextModel(model)){
|
||||
for(here=ISRCinstances(model);here!=NULL;
|
||||
here=here->ISRCnextInstance) {
|
||||
|
||||
/* 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 = here->RESnextInstance)
|
||||
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 = here->VSRCnextInstance)
|
||||
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 = here->ISRCnextInstance)
|
||||
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 = here->ASRCnextInstance) {
|
||||
|
||||
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 = here->ASRCnextInstance) {
|
||||
|
||||
i = here->ASRCtree->numVars;
|
||||
if (asrc_nvals < i) {
|
||||
|
|
|
|||
|
|
@ -56,14 +56,12 @@ typedef struct sASRCinstance {
|
|||
/* per model data */
|
||||
|
||||
typedef struct sASRCmodel { /* model structure for a source */
|
||||
int ASRCmodType; /* type index of this device */
|
||||
struct sASRCmodel *ASRCnextModel; /* pointer to next possible model
|
||||
* in linked list */
|
||||
ASRCinstance *ASRCinstances; /* pointer to list of instances
|
||||
* that have this model */
|
||||
IFuid ASRCmodName; /* pointer to character string naming this model */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define ASRCmodType gen.GENmodType
|
||||
#define ASRCnextModel(inst) ((struct sASRCmodel*)((inst)->gen.GENnextModel))
|
||||
#define ASRCinstances(inst) ((ASRCinstance*)((inst)->gen.GENinstances))
|
||||
#define ASRCmodName gen.GENmodName
|
||||
|
||||
} ASRCmodel;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ ASRCdestroy(GENmodel **inModel)
|
|||
ASRCmodel *mod = *(ASRCmodel**) inModel;
|
||||
|
||||
while (mod) {
|
||||
ASRCmodel *next_mod = mod->ASRCnextModel;
|
||||
ASRCinstance *inst = mod->ASRCinstances;
|
||||
ASRCmodel *next_mod = ASRCnextModel(mod);
|
||||
ASRCinstance *inst = ASRCinstances(mod);
|
||||
while (inst) {
|
||||
ASRCinstance *next_inst = inst->ASRCnextInstance;
|
||||
INPfreeTree(inst->ASRCtree);
|
||||
|
|
|
|||
|
|
@ -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 = here->ASRCnextInstance)
|
||||
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=here->ASRCnextInstance) {
|
||||
|
||||
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 = here->ASRCnextInstance) {
|
||||
|
||||
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=here->ASRCnextInstance) {
|
||||
|
||||
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 = here->ASRCnextInstance) {
|
||||
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 = here->ASRCnextInstance) {
|
||||
|
||||
/* Default Value Processing for Source Instance */
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ BJTacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double xcmcb;
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for( here = model->BJTinstances; here!= NULL;
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
|
||||
m = here->BJTm;
|
||||
|
|
|
|||
|
|
@ -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 = here->BJTnextInstance){
|
||||
|
||||
vbe=model->BJTtype*(
|
||||
*(ckt->CKTrhsOld+here->BJTbasePrimeNode)-
|
||||
|
|
|
|||
|
|
@ -323,14 +323,12 @@ typedef struct sBJTinstance {
|
|||
|
||||
/* per model data */
|
||||
typedef struct sBJTmodel { /* model structure for a bjt */
|
||||
int BJTmodType; /* type index of this device type */
|
||||
struct sBJTmodel *BJTnextModel; /* pointer to next possible model in
|
||||
* linked list */
|
||||
BJTinstance * BJTinstances; /* pointer to list of instances
|
||||
* that have this model */
|
||||
IFuid BJTmodName; /* pointer to character string naming this model */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define BJTmodType gen.GENmodType
|
||||
#define BJTnextModel(inst) ((struct sBJTmodel*)((inst)->gen.GENnextModel))
|
||||
#define BJTinstances(inst) ((BJTinstance*)((inst)->gen.GENinstances))
|
||||
#define BJTmodName gen.GENmodName
|
||||
|
||||
int BJTtype;
|
||||
int BJTsubs;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ BJTdestroy(GENmodel **inModel)
|
|||
BJTmodel *mod = *(BJTmodel**) inModel;
|
||||
|
||||
while (mod) {
|
||||
BJTmodel *next_mod = mod->BJTnextModel;
|
||||
BJTinstance *inst = mod->BJTinstances;
|
||||
BJTmodel *next_mod = BJTnextModel(mod);
|
||||
BJTinstance *inst = BJTinstances(mod);
|
||||
while (inst) {
|
||||
BJTinstance *next_inst = inst->BJTnextInstance;
|
||||
FREE(inst->BJTsens);
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
/* getting Volterra kernels */
|
||||
|
|
|
|||
|
|
@ -141,10 +141,10 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
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 = here->BJTnextInstance) {
|
||||
|
||||
if(!here->BJTicVBEGiven) {
|
||||
here->BJTicVBE =
|
||||
|
|
|
|||
|
|
@ -139,10 +139,10 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
vt = here->BJTtemp * CONSTKoverQ;
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ 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;
|
||||
for (model=firstModel; model != NULL; model=BJTnextModel(model)) {
|
||||
for (inst=BJTinstances(model); inst != NULL;
|
||||
inst=inst->BJTnextInstance) {
|
||||
|
||||
switch (operation) {
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ BJTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
double xcmcb;
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->BJTnextModel) {
|
||||
for( here = model->BJTinstances; here!= NULL;
|
||||
for( ; model != NULL; model = BJTnextModel(model)) {
|
||||
for( here = BJTinstances(model); here!= NULL;
|
||||
here = here->BJTnextInstance) {
|
||||
|
||||
m = here->BJTm;
|
||||
|
|
|
|||
|
|
@ -92,10 +92,10 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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,7 +345,7 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
*/
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
CKTnode *tmpNode;
|
||||
IFuid tmpName;
|
||||
|
|
@ -476,9 +476,9 @@ BJTunsetup(
|
|||
BJTinstance *here;
|
||||
|
||||
for (model = (BJTmodel *)inModel; model != NULL;
|
||||
model = model->BJTnextModel)
|
||||
model = BJTnextModel(model))
|
||||
{
|
||||
for (here = model->BJTinstances; here != NULL;
|
||||
for (here = BJTinstances(model); here != NULL;
|
||||
here=here->BJTnextInstance)
|
||||
{
|
||||
if (here->BJTemitPrimeNode > 0
|
||||
|
|
|
|||
|
|
@ -86,10 +86,10 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
#ifdef SENSDEBUG
|
||||
|
|
|
|||
|
|
@ -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=here->BJTnextInstance) {
|
||||
|
||||
vbe = fabs(ckt->CKTrhsOld [here->BJTbasePrimeNode] -
|
||||
ckt->CKTrhsOld [here->BJTemitPrimeNode]);
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
ckt->CKTsenInfo->SEN_parmVal[here->BJTsenParmNo] = here->BJTarea;
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
if(here->BJTsenParmNo){
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ 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 ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
sxpbe = 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,7 +100,7 @@ BJTtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
(1 + model->BJTjunctionExpBC);
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BJTinstances; here != NULL ;
|
||||
for (here = BJTinstances(model); here != NULL ;
|
||||
here=here->BJTnextInstance) {
|
||||
|
||||
double arg1, pbfact1, egfet1;
|
||||
|
|
|
|||
|
|
@ -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 = here->BJTnextInstance){
|
||||
|
||||
CKTterr(here->BJTqbe,ckt,timeStep);
|
||||
CKTterr(here->BJTqbc,ckt,timeStep);
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ B1acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m; /* parallel multiplier */
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = model->B1nextModel) {
|
||||
for(here = model->B1instances; here!= NULL;
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ 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 ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
vbs = model->B1type * (
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ B1destroy(GENmodel **inModel)
|
|||
B1model *mod = *(B1model**) inModel;
|
||||
|
||||
while (mod) {
|
||||
B1model *next_mod = mod->B1nextModel;
|
||||
B1instance *inst = mod->B1instances;
|
||||
B1model *next_mod = B1nextModel(mod);
|
||||
B1instance *inst = B1instances(mod);
|
||||
while (inst) {
|
||||
B1instance *next_inst = inst->B1nextInstance;
|
||||
FREE(inst);
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ 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 ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
/* loading starts here */
|
||||
|
|
|
|||
|
|
@ -125,10 +125,10 @@ 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 ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
|
|
|
|||
|
|
@ -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 = here->B1nextInstance) {
|
||||
|
||||
if(!here->B1icVBSGiven) {
|
||||
here->B1icVBS =
|
||||
|
|
|
|||
|
|
@ -129,10 +129,10 @@ 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 ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */
|
||||
|
|
|
|||
|
|
@ -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=inst->B1nextInstance) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ B1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->B1nextModel) {
|
||||
for(here = model->B1instances; here!= NULL;
|
||||
for( ; model != NULL; model = B1nextModel(model)) {
|
||||
for(here = B1instances(model); here!= NULL;
|
||||
here = here->B1nextInstance) {
|
||||
|
||||
if (here->B1mode >= 0) {
|
||||
|
|
|
|||
|
|
@ -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,7 +270,7 @@ B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
|
|||
}
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B1instances; here != NULL ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
CKTnode *tmpNode;
|
||||
|
|
@ -407,9 +407,9 @@ 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;
|
||||
for (here = B1instances(model); here != NULL;
|
||||
here=here->B1nextInstance)
|
||||
{
|
||||
if (here->B1sNodePrime > 0
|
||||
|
|
|
|||
|
|
@ -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,7 +45,7 @@ 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 ;
|
||||
for (here = B1instances(model); here != NULL ;
|
||||
here=here->B1nextInstance) {
|
||||
|
||||
if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) {
|
||||
|
|
|
|||
|
|
@ -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 = here->B1nextInstance){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -315,14 +315,12 @@ typedef struct sBSIM1instance {
|
|||
/* per model data */
|
||||
|
||||
typedef struct sBSIM1model { /* model structure for a resistor */
|
||||
int B1modType; /* type index of this device type */
|
||||
struct sBSIM1model *B1nextModel; /* pointer to next possible model
|
||||
*in linked list */
|
||||
B1instance * B1instances; /* pointer to list of instances
|
||||
* that have this model */
|
||||
IFuid B1modName; /* pointer to character string naming this model */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define B1modType gen.GENmodType
|
||||
#define B1nextModel(inst) ((struct sBSIM1model*)((inst)->gen.GENnextModel))
|
||||
#define B1instances(inst) ((B1instance*)((inst)->gen.GENinstances))
|
||||
#define B1modName gen.GENmodName
|
||||
|
||||
int B1type; /* device type : 1 = nmos, -1 = pmos */
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ B2acLoad(GENmodel *inModel, CKTcircuit *ckt)
|
|||
double m; /* parallel multiplier */
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for( ; model != NULL; model = model->B2nextModel) {
|
||||
for(here = model->B2instances; here!= NULL;
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@ 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 ;
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
|
||||
vbs = model->B2type * (
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ B2destroy(GENmodel **inModel)
|
|||
B2model *mod = *(B2model**) inModel;
|
||||
|
||||
while (mod) {
|
||||
B2model *next_mod = mod->B2nextModel;
|
||||
B2instance *inst = mod->B2instances;
|
||||
B2model *next_mod = B2nextModel(mod);
|
||||
B2instance *inst = B2instances(mod);
|
||||
while (inst) {
|
||||
B2instance *next_inst = inst->B2nextInstance;
|
||||
FREE(inst);
|
||||
|
|
|
|||
|
|
@ -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 = here->B2nextInstance) {
|
||||
|
||||
if(!here->B2icVBSGiven) {
|
||||
here->B2icVBS =
|
||||
|
|
|
|||
|
|
@ -130,10 +130,10 @@ 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 ;
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
|
||||
EffectiveLength=here->B2l - model->B2deltaL * 1.e-6;/* m */
|
||||
|
|
|
|||
|
|
@ -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=inst->B2nextInstance) {
|
||||
|
||||
switch (operation) {
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,8 @@ B2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s)
|
|||
|
||||
double m;
|
||||
|
||||
for( ; model != NULL; model = model->B2nextModel) {
|
||||
for(here = model->B2instances; here!= NULL;
|
||||
for( ; model != NULL; model = B2nextModel(model)) {
|
||||
for(here = B2instances(model); here!= NULL;
|
||||
here = here->B2nextInstance) {
|
||||
|
||||
if (here->B2mode >= 0) {
|
||||
|
|
|
|||
|
|
@ -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,7 +431,7 @@ B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
}
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
|
||||
/* allocate a chunk of the state vector */
|
||||
|
|
@ -576,9 +576,9 @@ B2unsetup(
|
|||
B2instance *here;
|
||||
|
||||
for (model = (B2model *)inModel; model != NULL;
|
||||
model = model->B2nextModel)
|
||||
model = B2nextModel(model))
|
||||
{
|
||||
for (here = model->B2instances; here != NULL;
|
||||
for (here = B2instances(model); here != NULL;
|
||||
here=here->B2nextInstance)
|
||||
{
|
||||
if (here->B2sNodePrime > 0
|
||||
|
|
|
|||
|
|
@ -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,7 +50,7 @@ B2temp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
pLastKnot = NULL;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B2instances; here != NULL ;
|
||||
for (here = B2instances(model); here != NULL ;
|
||||
here=here->B2nextInstance) {
|
||||
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
|
|
|
|||
|
|
@ -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 = here->B2nextInstance){
|
||||
|
||||
#ifdef STEPDEBUG
|
||||
debugtemp = *timeStep;
|
||||
|
|
|
|||
|
|
@ -237,14 +237,12 @@ struct bsim2SizeDependParam
|
|||
/* per model data */
|
||||
|
||||
typedef struct sBSIM2model { /* model structure for a resistor */
|
||||
int B2modType; /* type index of this device type */
|
||||
struct sBSIM2model *B2nextModel; /* pointer to next possible model
|
||||
*in linked list */
|
||||
B2instance * B2instances; /* pointer to list of instances
|
||||
* that have this model */
|
||||
IFuid B2modName; /* pointer to the name of this model */
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define B2modType gen.GENmodType
|
||||
#define B2nextModel(inst) ((struct sBSIM2model*)((inst)->gen.GENnextModel))
|
||||
#define B2instances(inst) ((B2instance*)((inst)->gen.GENinstances))
|
||||
#define B2modName gen.GENmodName
|
||||
|
||||
int B2type; /* device type: 1 = nmos, -1 = pmos */
|
||||
int pad;
|
||||
|
|
|
|||
|
|
@ -43,8 +43,8 @@ double xcsbbi, xcggbi, xcgdbi, xcgsbi, xcgbbi;
|
|||
double m;
|
||||
|
||||
omega = ckt->CKTomega;
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here!= NULL;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
Csd = -(here->BSIM3cddb + here->BSIM3cgdb + here->BSIM3cbdb);
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ 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 ;
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
vbs = model->BSIM3type
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ BSIM3destroy(GENmodel **inModel)
|
|||
#endif
|
||||
|
||||
while (mod) {
|
||||
BSIM3model *next_mod = mod->BSIM3nextModel;
|
||||
BSIM3instance *inst = mod->BSIM3instances;
|
||||
BSIM3model *next_mod = BSIM3nextModel(mod);
|
||||
BSIM3instance *inst = BSIM3instances(mod);
|
||||
|
||||
/** added to get rid of link list pSizeDependParamKnot **/
|
||||
struct bsim3SizeDependParam *p = mod->pSizeDependParamKnot;
|
||||
|
|
|
|||
|
|
@ -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 = here->BSIM3nextInstance)
|
||||
{
|
||||
if (!here->BSIM3icVBSGiven)
|
||||
{ here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode)
|
||||
|
|
|
|||
|
|
@ -179,8 +179,8 @@ ChargeComputationNeeded =
|
|||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)))
|
||||
? 1 : 0;
|
||||
#ifndef USE_OMP
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -139,8 +139,8 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{ pParam = here->pParam;
|
||||
switch (operation)
|
||||
|
|
|
|||
|
|
@ -37,8 +37,8 @@ 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;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here!= NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3mode >= 0)
|
||||
|
|
|
|||
|
|
@ -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,7 +920,7 @@ BSIM3instance **InstArray;
|
|||
model->BSIM3vbdrMax = 1e99;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->BSIM3instances; here != NULL ;
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
|
|
@ -1129,10 +1129,10 @@ 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 ;
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
InstCount++;
|
||||
|
|
@ -1141,10 +1141,10 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
|
|||
InstArray = TMALLOC(BSIM3instance*, InstCount);
|
||||
model = (BSIM3model*)inModel;
|
||||
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 ;
|
||||
for (here = BSIM3instances(model); here != NULL ;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
InstArray[idx] = here;
|
||||
|
|
@ -1168,9 +1168,9 @@ BSIM3unsetup(
|
|||
BSIM3instance *here;
|
||||
|
||||
for (model = (BSIM3model *)inModel; model != NULL;
|
||||
model = model->BSIM3nextModel)
|
||||
model = BSIM3nextModel(model))
|
||||
{
|
||||
for (here = model->BSIM3instances; here != NULL;
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here=here->BSIM3nextInstance)
|
||||
{
|
||||
if (here->BSIM3qNode > 0)
|
||||
|
|
|
|||
|
|
@ -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 = here->BSIM3nextInstance) {
|
||||
|
||||
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,7 +143,7 @@ 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;
|
||||
for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
pSizeDependParamKnot = model->pSizeDependParamKnot;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ BSIM3instance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->BSIM3nextModel)
|
||||
{ for (here = model->BSIM3instances; here != NULL;
|
||||
for (; model != NULL; model = BSIM3nextModel(model))
|
||||
{ for (here = BSIM3instances(model); here != NULL;
|
||||
here = here->BSIM3nextInstance)
|
||||
{
|
||||
#ifdef STEPDEBUG
|
||||
|
|
|
|||
|
|
@ -399,12 +399,12 @@ struct bsim3SizeDependParam
|
|||
|
||||
typedef struct sBSIM3model
|
||||
{
|
||||
int BSIM3modType;
|
||||
struct sBSIM3model *BSIM3nextModel;
|
||||
BSIM3instance *BSIM3instances;
|
||||
IFuid BSIM3modName;
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define BSIM3modType gen.GENmodType
|
||||
#define BSIM3nextModel(inst) ((struct sBSIM3model*)((inst)->gen.GENnextModel))
|
||||
#define BSIM3instances(inst) ((BSIM3instance*)((inst)->gen.GENinstances))
|
||||
#define BSIM3modName gen.GENmodName
|
||||
|
||||
int BSIM3type;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,10 +48,10 @@ 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;
|
||||
for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0);
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ 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 ;
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
{
|
||||
vbs = model->B3SOIDDtype
|
||||
|
|
|
|||
|
|
@ -597,12 +597,12 @@ struct b3soiddSizeDependParam
|
|||
|
||||
typedef struct sB3SOIDDmodel
|
||||
{
|
||||
int B3SOIDDmodType;
|
||||
struct sB3SOIDDmodel *B3SOIDDnextModel;
|
||||
B3SOIDDinstance *B3SOIDDinstances;
|
||||
IFuid B3SOIDDmodName;
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define B3SOIDDmodType gen.GENmodType
|
||||
#define B3SOIDDnextModel(inst) ((struct sB3SOIDDmodel*)((inst)->gen.GENnextModel))
|
||||
#define B3SOIDDinstances(inst) ((B3SOIDDinstance*)((inst)->gen.GENinstances))
|
||||
#define B3SOIDDmodName gen.GENmodName
|
||||
|
||||
int B3SOIDDtype;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ B3SOIDDdestroy(GENmodel **inModel)
|
|||
B3SOIDDmodel *mod = *(B3SOIDDmodel**) inModel;
|
||||
|
||||
while (mod) {
|
||||
B3SOIDDmodel *next_mod = mod->B3SOIDDnextModel;
|
||||
B3SOIDDinstance *inst = mod->B3SOIDDinstances;
|
||||
B3SOIDDmodel *next_mod = B3SOIDDnextModel(mod);
|
||||
B3SOIDDinstance *inst = B3SOIDDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIDDinstance *next_inst = inst->B3SOIDDnextInstance;
|
||||
FREE(inst);
|
||||
|
|
|
|||
|
|
@ -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 = here->B3SOIDDnextInstance)
|
||||
{
|
||||
if(!here->B3SOIDDicVBSGiven)
|
||||
{ here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode)
|
||||
|
|
|
|||
|
|
@ -304,8 +304,8 @@ char nanmessage [12];
|
|||
double m;
|
||||
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
Check = 0;
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
pParam = here->pParam;
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here!= NULL;
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here!= NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
if (here->B3SOIDDmode >= 0)
|
||||
|
|
|
|||
|
|
@ -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,7 +874,7 @@ IFuid tmpName;
|
|||
model->B3SOIDDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIDDinstances; here != NULL ;
|
||||
for (here = B3SOIDDinstances(model); here != NULL ;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
|
|
@ -1357,9 +1357,9 @@ 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;
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here=here->B3SOIDDnextInstance)
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
|
|
|
|||
|
|
@ -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,7 +72,7 @@ int Size_Not_Found;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIDDinstances; here != NULL;
|
||||
for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
here->B3SOIDDrbodyext = here->B3SOIDDbodySquares *
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ B3SOIDDinstance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->B3SOIDDnextModel)
|
||||
{ for (here = model->B3SOIDDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIDDnextModel(model))
|
||||
{ for (here = B3SOIDDinstances(model); here != NULL;
|
||||
here = here->B3SOIDDnextInstance)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ 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;
|
||||
for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0);
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ 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 ;
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
{
|
||||
vbs = model->B3SOIFDtype
|
||||
|
|
|
|||
|
|
@ -597,12 +597,12 @@ struct b3soifdSizeDependParam
|
|||
|
||||
typedef struct sB3SOIFDmodel
|
||||
{
|
||||
int B3SOIFDmodType;
|
||||
struct sB3SOIFDmodel *B3SOIFDnextModel;
|
||||
B3SOIFDinstance *B3SOIFDinstances;
|
||||
IFuid B3SOIFDmodName;
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define B3SOIFDmodType gen.GENmodType
|
||||
#define B3SOIFDnextModel(inst) ((struct sB3SOIFDmodel*)((inst)->gen.GENnextModel))
|
||||
#define B3SOIFDinstances(inst) ((B3SOIFDinstance*)((inst)->gen.GENinstances))
|
||||
#define B3SOIFDmodName gen.GENmodName
|
||||
|
||||
int B3SOIFDtype;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ B3SOIFDdestroy(GENmodel **inModel)
|
|||
B3SOIFDmodel *mod = *(B3SOIFDmodel**) inModel;
|
||||
|
||||
while (mod) {
|
||||
B3SOIFDmodel *next_mod = mod->B3SOIFDnextModel;
|
||||
B3SOIFDinstance *inst = mod->B3SOIFDinstances;
|
||||
B3SOIFDmodel *next_mod = B3SOIFDnextModel(mod);
|
||||
B3SOIFDinstance *inst = B3SOIFDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIFDinstance *next_inst = inst->B3SOIFDnextInstance;
|
||||
FREE(inst);
|
||||
|
|
|
|||
|
|
@ -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 = here->B3SOIFDnextInstance)
|
||||
{
|
||||
if(!here->B3SOIFDicVBSGiven)
|
||||
{ here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode)
|
||||
|
|
|
|||
|
|
@ -274,8 +274,8 @@ char nanmessage [12];
|
|||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
Check = 0;
|
||||
|
|
|
|||
|
|
@ -127,8 +127,8 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
pParam = here->pParam;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here!= NULL;
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here!= NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
if (here->B3SOIFDmode >= 0)
|
||||
|
|
|
|||
|
|
@ -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,7 +875,7 @@ IFuid tmpName;
|
|||
model->B3SOIFDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIFDinstances; here != NULL ;
|
||||
for (here = B3SOIFDinstances(model); here != NULL ;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
|
|
@ -1346,9 +1346,9 @@ 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;
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here=here->B3SOIFDnextInstance)
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
|
|
|
|||
|
|
@ -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,7 +71,7 @@ int Size_Not_Found;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIFDinstances; here != NULL;
|
||||
for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
here->B3SOIFDrbodyext = here->B3SOIFDbodySquares *
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ B3SOIFDinstance *here;
|
|||
double debugtemp;
|
||||
#endif /* STEPDEBUG */
|
||||
|
||||
for (; model != NULL; model = model->B3SOIFDnextModel)
|
||||
{ for (here = model->B3SOIFDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIFDnextModel(model))
|
||||
{ for (here = B3SOIFDinstances(model); here != NULL;
|
||||
here = here->B3SOIFDnextInstance)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ 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;
|
||||
for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0);
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ 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 ;
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
{
|
||||
vbs = model->B3SOIPDtype
|
||||
|
|
|
|||
|
|
@ -587,12 +587,12 @@ struct b3soipdSizeDependParam
|
|||
|
||||
typedef struct sB3SOIPDmodel
|
||||
{
|
||||
int B3SOIPDmodType;
|
||||
struct sB3SOIPDmodel *B3SOIPDnextModel;
|
||||
B3SOIPDinstance *B3SOIPDinstances;
|
||||
IFuid B3SOIPDmodName;
|
||||
struct GENmodel gen;
|
||||
|
||||
/* --- end of generic struct GENmodel --- */
|
||||
#define B3SOIPDmodType gen.GENmodType
|
||||
#define B3SOIPDnextModel(inst) ((struct sB3SOIPDmodel*)((inst)->gen.GENnextModel))
|
||||
#define B3SOIPDinstances(inst) ((B3SOIPDinstance*)((inst)->gen.GENinstances))
|
||||
#define B3SOIPDmodName gen.GENmodName
|
||||
|
||||
int B3SOIPDtype;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ B3SOIPDdestroy(GENmodel **inModel)
|
|||
B3SOIPDmodel *mod = *(B3SOIPDmodel**) inModel;
|
||||
|
||||
while (mod) {
|
||||
B3SOIPDmodel *next_mod = mod->B3SOIPDnextModel;
|
||||
B3SOIPDinstance *inst = mod->B3SOIPDinstances;
|
||||
B3SOIPDmodel *next_mod = B3SOIPDnextModel(mod);
|
||||
B3SOIPDinstance *inst = B3SOIPDinstances(mod);
|
||||
while (inst) {
|
||||
B3SOIPDinstance *next_inst = inst->B3SOIPDnextInstance;
|
||||
FREE(inst);
|
||||
|
|
|
|||
|
|
@ -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 = here->B3SOIPDnextInstance)
|
||||
{
|
||||
if(!here->B3SOIPDicVBSGiven)
|
||||
{ here->B3SOIPDicVBS = *(ckt->CKTrhs + here->B3SOIPDbNode)
|
||||
|
|
|
|||
|
|
@ -291,8 +291,8 @@ double gigT;
|
|||
|
||||
double m;
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
Check = 0;
|
||||
|
|
|
|||
|
|
@ -131,8 +131,8 @@ int i;
|
|||
"" /* total transistor noise */
|
||||
};
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here != NULL;
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
pParam = here->pParam;
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ double m;
|
|||
|
||||
NG_IGNORE(ckt);
|
||||
|
||||
for (; model != NULL; model = model->B3SOIPDnextModel)
|
||||
{ for (here = model->B3SOIPDinstances; here!= NULL;
|
||||
for (; model != NULL; model = B3SOIPDnextModel(model))
|
||||
{ for (here = B3SOIPDinstances(model); here!= NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
if (here->B3SOIPDmode >= 0)
|
||||
|
|
|
|||
|
|
@ -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,7 +1048,7 @@ IFuid tmpName;
|
|||
model->B3SOIPDnoif = 1.0;
|
||||
|
||||
/* loop through all the instances of the model */
|
||||
for (here = model->B3SOIPDinstances; here != NULL ;
|
||||
for (here = B3SOIPDinstances(model); here != NULL ;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
{
|
||||
/* allocate a chunk of the state vector */
|
||||
|
|
@ -1461,9 +1461,9 @@ B3SOIPDunsetup(
|
|||
B3SOIPDinstance *here;
|
||||
|
||||
for (model = (B3SOIPDmodel *)inModel; model != NULL;
|
||||
model = model->B3SOIPDnextModel)
|
||||
model = B3SOIPDnextModel(model))
|
||||
{
|
||||
for (here = model->B3SOIPDinstances; here != NULL;
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here=here->B3SOIPDnextInstance)
|
||||
{
|
||||
/* here for debugging purpose only */
|
||||
|
|
|
|||
|
|
@ -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,7 +90,7 @@ double tmp3, T7;
|
|||
|
||||
/* loop through all the instances of the model */
|
||||
/* MCJ: Length and Width not initialized */
|
||||
for (here = model->B3SOIPDinstances; here != NULL;
|
||||
for (here = B3SOIPDinstances(model); here != NULL;
|
||||
here = here->B3SOIPDnextInstance)
|
||||
{
|
||||
here->B3SOIPDrbodyext = here->B3SOIPDbodySquares *
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue