tlevc=1 correction
This commit is contained in:
parent
b4424c9d2c
commit
d2f9fe7379
|
|
@ -1,3 +1,7 @@
|
|||
2012-01-30 Dietmar Warning
|
||||
* src/spicelib/devices/dio/diotemp.c: Add temperature dependent
|
||||
junction potentials also for tlevc=1 capacitor temperature model
|
||||
|
||||
2012-01-28 Robert Larice
|
||||
* src/include/ngspice/ngspice.h :
|
||||
define NAN for non C99 environments
|
||||
|
|
|
|||
|
|
@ -75,6 +75,11 @@ IFparm DIOmPTable[] = { /* model parameters */
|
|||
IOP( "cta", DIO_MOD_CTA, IF_REAL, "Area junction temperature coefficient"),
|
||||
IOPR( "ctc", DIO_MOD_CTA, IF_REAL, "Area junction capacitance temperature coefficient"),
|
||||
IOP( "ctp", DIO_MOD_CTP, IF_REAL, "Perimeter junction capacitance temperature coefficient"),
|
||||
|
||||
IOP( "tbp", DIO_MOD_TBP, IF_REAL, "Area junction potential temperature coefficient"),
|
||||
IOPR( "tvj", DIO_MOD_TBP, IF_REAL, "Area junction potential temperature coefficient"),
|
||||
IOP( "tphp", DIO_MOD_TPHP, IF_REAL, "Perimeter junction potential temperature coefficient"),
|
||||
|
||||
IOP( "kf", DIO_MOD_KF, IF_REAL, "flicker noise coefficient"),
|
||||
IOP( "af", DIO_MOD_AF, IF_REAL, "flicker noise exponent"),
|
||||
IOP( "fc", DIO_MOD_FC, IF_REAL, "Forward bias junction fit parameter"),
|
||||
|
|
|
|||
|
|
@ -186,6 +186,8 @@ typedef struct sDIOmodel { /* model structure for a diode */
|
|||
unsigned DIOsaturationCurrentExpGiven : 1;
|
||||
unsigned DIOctaGiven : 1;
|
||||
unsigned DIOctpGiven : 1;
|
||||
unsigned DIOtbpGiven : 1;
|
||||
unsigned DIOtphpGiven : 1;
|
||||
unsigned DIOdepletionCapCoeffGiven : 1;
|
||||
unsigned DIOdepletionSWcapCoeffGiven :1;
|
||||
unsigned DIObreakdownVoltageGiven : 1;
|
||||
|
|
@ -223,6 +225,8 @@ typedef struct sDIOmodel { /* model structure for a diode */
|
|||
double DIOsaturationCurrentExp; /* Saturation current exponential (XTI) */
|
||||
double DIOcta; /* Area junction temperature coefficient */
|
||||
double DIOctp; /* Perimeter junction temperature coefficient */
|
||||
double DIOtbp; /* Area junction potential temperature coefficient */
|
||||
double DIOtphp; /* Perimeter junction potential temperature coefficient */
|
||||
double DIOdepletionCapCoeff; /* Depletion Cap fraction coefficient (FC)*/
|
||||
double DIOdepletionSWcapCoeff; /* Depletion sw-Cap fraction coefficient (FCS)*/
|
||||
double DIObreakdownVoltage; /* Voltage at reverse breakdown */
|
||||
|
|
@ -293,7 +297,9 @@ typedef struct sDIOmodel { /* model structure for a diode */
|
|||
#define DIO_MOD_TLEVC 132
|
||||
#define DIO_MOD_CTA 133
|
||||
#define DIO_MOD_CTP 134
|
||||
#define DIO_MOD_TCV 135
|
||||
#define DIO_MOD_TBP 135
|
||||
#define DIO_MOD_TPHP 136
|
||||
#define DIO_MOD_TCV 137
|
||||
|
||||
#include "dioext.h"
|
||||
#endif /*DIO*/
|
||||
|
|
|
|||
|
|
@ -104,6 +104,12 @@ DIOmAsk (CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value)
|
|||
case DIO_MOD_CTP:
|
||||
value->rValue = model->DIOctp;
|
||||
return(OK);
|
||||
case DIO_MOD_TBP:
|
||||
value->rValue = model->DIOtbp;
|
||||
return(OK);
|
||||
case DIO_MOD_TPHP:
|
||||
value->rValue = model->DIOtphp;
|
||||
return(OK);
|
||||
case DIO_MOD_FC:
|
||||
value->rValue = model->DIOdepletionCapCoeff;
|
||||
return(OK);
|
||||
|
|
|
|||
|
|
@ -125,6 +125,14 @@ DIOmParam(int param, IFvalue *value, GENmodel *inModel)
|
|||
model->DIOctp = value->rValue;
|
||||
model->DIOctpGiven = TRUE;
|
||||
break;
|
||||
case DIO_MOD_TBP:
|
||||
model->DIOtbp = value->rValue;
|
||||
model->DIOtbpGiven = TRUE;
|
||||
break;
|
||||
case DIO_MOD_TPHP:
|
||||
model->DIOtphp = value->rValue;
|
||||
model->DIOtphpGiven = TRUE;
|
||||
break;
|
||||
case DIO_MOD_FC:
|
||||
model->DIOdepletionCapCoeff = value->rValue;
|
||||
model->DIOdepletionCapCoeffGiven = TRUE;
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@ DIOsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
if(!model->DIOctpGiven) {
|
||||
model->DIOctp = 0.0;
|
||||
}
|
||||
if(!model->DIOtbpGiven) {
|
||||
model->DIOtbp = 0.0;
|
||||
}
|
||||
if(!model->DIOtphpGiven) {
|
||||
model->DIOtphp = 0.0;
|
||||
}
|
||||
if(!model->DIOfNcoefGiven) {
|
||||
model->DIOfNcoef = 0.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ DIOtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here->DIOtJctCap *= 1+here->DIOtGradingCoeff*
|
||||
(400e-6*(here->DIOtemp-REFTEMP)-gmanew);
|
||||
} else if (model->DIOtlevc == 1) {
|
||||
here->DIOtJctPot = model->DIOjunctionPot - model->DIOtbp*(here->DIOtemp-REFTEMP);
|
||||
here->DIOtJctCap = model->DIOjunctionCap *
|
||||
(model->DIOcta*(here->DIOtemp-REFTEMP));
|
||||
}
|
||||
|
|
@ -147,6 +148,7 @@ DIOtemp(GENmodel *inModel, CKTcircuit *ckt)
|
|||
here->DIOtJctSWCap *= 1+model->DIOgradingSWCoeff*
|
||||
(400e-6*(here->DIOtemp-REFTEMP)-gmaSWnew);
|
||||
} else if (model->DIOtlevc == 1) {
|
||||
here->DIOtJctSWPot = model->DIOjunctionSWPot - model->DIOtphp*(here->DIOtemp-REFTEMP);
|
||||
here->DIOtJctSWCap = model->DIOjunctionSWCap *
|
||||
(model->DIOctp*(here->DIOtemp-REFTEMP));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue