alternative geometry correction `del' for semiconductor capacitors

This commit is contained in:
dwarning 2013-05-09 21:50:55 +02:00 committed by rlar
parent 661314a397
commit 08df80cebe
5 changed files with 28 additions and 7 deletions

View File

@ -47,6 +47,7 @@ IFparm CAPmPTable[] = { /* names of model parameters */
IOPR( "l", CAP_MOD_DEFLENGTH,IF_REAL, "Default length"),
IOPA( "narrow", CAP_MOD_NARROW, IF_REAL, "width correction factor"),
IOPA( "short", CAP_MOD_SHORT, IF_REAL, "length correction factor"),
IOPA( "del", CAP_MOD_DEL, IF_REAL, "length and width correction factor"),
IOPA( "tc1", CAP_MOD_TC1, IF_REAL, "First order temp. coefficient"),
IOPA( "tc2", CAP_MOD_TC2, IF_REAL, "Second order temp. coefficient"),
IOPXU("tnom", CAP_MOD_TNOM, IF_REAL, "Parameter measurement temperature"),

View File

@ -88,6 +88,7 @@ typedef struct sCAPmodel { /* model structure for a capacitor */
double CAPdefLength; /* the default length of a capacitor */
double CAPnarrow; /* amount by which width are less than drawn */
double CAPshort; /* amount by which length are less than drawn */
double CAPdel; /* amount by which length and width are less than drawn */
double CAPdi; /* Relative dielectric constant */
double CAPthick; /* Insulator thickness */
unsigned CAPmCapGiven : 1; /* flag indicates default capacitance given */
@ -97,6 +98,7 @@ typedef struct sCAPmodel { /* model structure for a capacitor */
unsigned CAPdefLengthGiven : 1; /* flag indicates deafult lenght given */
unsigned CAPnarrowGiven : 1; /* flag indicates narrowing factor given */
unsigned CAPshortGiven : 1; /* flag indicates shortening factor given */
unsigned CAPdelGiven : 1; /* flag indicates del factor given */
unsigned CAPtnomGiven : 1; /* flag indicates nominal temp. given */
unsigned CAPtc1Given : 1; /* flag indicates tc1 was specified */
unsigned CAPtc2Given : 1; /* flag indicates tc2 was specified */
@ -127,13 +129,14 @@ typedef struct sCAPmodel { /* model structure for a capacitor */
#define CAP_MOD_C 104
#define CAP_MOD_NARROW 105
#define CAP_MOD_SHORT 106
#define CAP_MOD_TC1 107
#define CAP_MOD_TC2 108
#define CAP_MOD_TNOM 109
#define CAP_MOD_DI 110
#define CAP_MOD_THICK 111
#define CAP_MOD_CAP 112
#define CAP_MOD_DEFLENGTH 113
#define CAP_MOD_DEL 107
#define CAP_MOD_TC1 108
#define CAP_MOD_TC2 109
#define CAP_MOD_TNOM 110
#define CAP_MOD_DI 111
#define CAP_MOD_THICK 112
#define CAP_MOD_CAP 113
#define CAP_MOD_DEFLENGTH 114
/* device questions */
#define CAP_QUEST_SENS_REAL 201

View File

@ -54,6 +54,9 @@ CAPmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value)
case CAP_MOD_SHORT:
value->rValue = here->CAPshort;
return(OK);
case CAP_MOD_DEL:
value->rValue = here->CAPdel;
return(OK);
case CAP_MOD_DI:
value->rValue = here->CAPdi;
return(OK);

View File

@ -58,6 +58,10 @@ CAPmParam(int param, IFvalue *value, GENmodel *inModel)
mod->CAPshort = value->rValue;
mod->CAPshortGiven = TRUE;
break;
case CAP_MOD_DEL:
mod->CAPdel = value->rValue;
mod->CAPdelGiven = TRUE;
break;
case CAP_MOD_DI:
mod->CAPdi = value->rValue;
mod->CAPdiGiven = TRUE;

View File

@ -46,6 +46,9 @@ CAPsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if (!model->CAPshortGiven) {
model->CAPshort = 0.0;
}
if (!model->CAPdelGiven) {
model->CAPdel = 0.0;
}
if (!model->CAPtc1Given) {
model->CAPtempCoeff1 = 0.0;
}
@ -74,6 +77,13 @@ CAPsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
}
if (model->CAPdelGiven) {
if (!model->CAPnarrowGiven)
model->CAPnarrow = 2 * model->CAPdel;
if (!model->CAPshortGiven)
model->CAPshort = 2 * model->CAPdel;
}
/* loop through all the instances of the model */
for (here = model->CAPinstances; here != NULL ;
here=here->CAPnextInstance) {