Browse Source

NAN in parameter output removed

pre-master-46
h_vogt 16 years ago
parent
commit
0a1a142023
  1. 7
      ChangeLog
  2. 6
      src/spicelib/devices/jfet/jfetmask.c
  3. 5
      src/spicelib/devices/mesa/mesadefs.h
  4. 17
      src/spicelib/devices/mesa/mesamask.c
  5. 3
      src/spicelib/devices/mesa/mesamparam.c
  6. 18
      src/spicelib/devices/mesa/mesasetup.c

7
ChangeLog

@ -1,3 +1,9 @@
============================ Rework-22 ==================================
2010-09-26 Holger Vogt
* mesadefs.h, mesamsak.c, mesamparam.c, mesasetup.c
jfetmask.c: remove NAN or exp -312 outputs
2010-10-01 Robert Larice
* src/spicelib/devices/hfet1/hfetmask.c ,
* src/spicelib/devices/hfet2/hfet2mask.c ,
@ -24,7 +30,6 @@
this works around a bug as well, which caused erronous lexer c files
to be included in the distribution tar ball
============================ Rework-22 ==================================
2010-09-26 Holger Vogt
* .cvsignore: m4 entry removed

6
src/spicelib/devices/jfet/jfetmask.c

@ -68,6 +68,12 @@ JFETmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
case JFET_MOD_SOURCECONDUCT:
value->rValue = model->JFETsourceConduct;
return(OK);
case JFET_MOD_KF:
value->rValue = model->JFETfNcoef;
return(OK);
case JFET_MOD_AF:
value->rValue = model->JFETfNexp;
return(OK);
case JFET_MOD_TYPE:
if (model->JFETtype == NJF)
value->sValue = "njf";

5
src/spicelib/devices/mesa/mesadefs.h

@ -250,6 +250,8 @@ typedef struct sMESAmodel { /* model structure for a MESAfet */
double MESArsi;
double MESAdrainResist;
double MESAsourceResist;
double MESAdrainConduct;
double MESAsourceConduct;
double MESAgateResist;
double MESAri;
double MESArf;
@ -284,7 +286,8 @@ typedef struct sMESAmodel { /* model structure for a MESAfet */
double MESAepsi;
double MESAcbs;
double MESAcas;
double MESAvcrit;
double MESAsigma;
double MESAvpo;
double MESAvpou;

17
src/spicelib/devices/mesa/mesamask.c

@ -206,12 +206,21 @@ MESAmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
case MESA_MOD_CAS:
value->rValue = here->MESAcas;
return (OK);
case MESA_MOD_TYPE:
if (here->MESAtype == NMF)
case MESA_MOD_TYPE:
if (here->MESAtype == NMF)
value->sValue = "nmf";
else
else
value->sValue = "pmf";
return (OK);
return (OK);
case MESA_MOD_DRAINCONDUCT:
value->rValue = here->MESAdrainConduct;
return (OK);
case MESA_MOD_SOURCECONDUCT:
value->rValue = here->MESAsourceConduct;
return (OK);
case MESA_MOD_VCRIT:
value->rValue = here->MESAvcrit;
return (OK);
default:
return (E_BADPARM);
}

3
src/spicelib/devices/mesa/mesamparam.c

@ -165,6 +165,9 @@ MESAmParam(int param, IFvalue *value, GENmodel *inModel)
model->MESAtc = value->rValue;
break;
case MESA_MOD_NMF:
if(value->iValue) {
model->MESAtype = NMF;
}
break;
case MESA_MOD_TVTO:
model->MESAtvtoGiven = TRUE;

18
src/spicelib/devices/mesa/mesasetup.c

@ -28,6 +28,9 @@ MESAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
/* loop through all the diode models */
for( ; model != NULL; model = model->MESAnextModel ) {
if( (model->MESAtype != NMF) ) {
model->MESAtype = NMF;
}
if(!model->MESAthresholdGiven) {
model->MESAthreshold = -1.26;
}
@ -207,7 +210,20 @@ MESAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
if(!model->MESAcbsGiven) {
model->MESAcbs = 1;
}
}
if(model->MESAdrainResist != 0) {
model->MESAdrainConduct = 1./model->MESAdrainResist;
} else {
model->MESAdrainConduct = 0.;
}
if(model->MESAsourceResist != 0) {
model->MESAsourceConduct = 1./model->MESAsourceResist;
} else {
model->MESAsourceConduct = 0.;
}
model->MESAvcrit = 0.; /* until model has changed */
/* loop through all the instances of the model */
for (here = model->MESAinstances; here != NULL ;

Loading…
Cancel
Save