Browse Source

alternative geometry correction `del' for semiconductor capacitors

pre-master-46
dwarning 13 years ago
committed by rlar
parent
commit
08df80cebe
  1. 1
      src/spicelib/devices/cap/cap.c
  2. 17
      src/spicelib/devices/cap/capdefs.h
  3. 3
      src/spicelib/devices/cap/capmask.c
  4. 4
      src/spicelib/devices/cap/capmpar.c
  5. 10
      src/spicelib/devices/cap/capsetup.c

1
src/spicelib/devices/cap/cap.c

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

17
src/spicelib/devices/cap/capdefs.h

@ -88,6 +88,7 @@ typedef struct sCAPmodel { /* model structure for a capacitor */
double CAPdefLength; /* the default length of a capacitor */ double CAPdefLength; /* the default length of a capacitor */
double CAPnarrow; /* amount by which width are less than drawn */ double CAPnarrow; /* amount by which width are less than drawn */
double CAPshort; /* amount by which length 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 CAPdi; /* Relative dielectric constant */
double CAPthick; /* Insulator thickness */ double CAPthick; /* Insulator thickness */
unsigned CAPmCapGiven : 1; /* flag indicates default capacitance given */ 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 CAPdefLengthGiven : 1; /* flag indicates deafult lenght given */
unsigned CAPnarrowGiven : 1; /* flag indicates narrowing factor given */ unsigned CAPnarrowGiven : 1; /* flag indicates narrowing factor given */
unsigned CAPshortGiven : 1; /* flag indicates shortening 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 CAPtnomGiven : 1; /* flag indicates nominal temp. given */
unsigned CAPtc1Given : 1; /* flag indicates tc1 was specified */ unsigned CAPtc1Given : 1; /* flag indicates tc1 was specified */
unsigned CAPtc2Given : 1; /* flag indicates tc2 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_C 104
#define CAP_MOD_NARROW 105 #define CAP_MOD_NARROW 105
#define CAP_MOD_SHORT 106 #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 */ /* device questions */
#define CAP_QUEST_SENS_REAL 201 #define CAP_QUEST_SENS_REAL 201

3
src/spicelib/devices/cap/capmask.c

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

4
src/spicelib/devices/cap/capmpar.c

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

10
src/spicelib/devices/cap/capsetup.c

@ -46,6 +46,9 @@ CAPsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if (!model->CAPshortGiven) { if (!model->CAPshortGiven) {
model->CAPshort = 0.0; model->CAPshort = 0.0;
} }
if (!model->CAPdelGiven) {
model->CAPdel = 0.0;
}
if (!model->CAPtc1Given) { if (!model->CAPtc1Given) {
model->CAPtempCoeff1 = 0.0; 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 */ /* loop through all the instances of the model */
for (here = model->CAPinstances; here != NULL ; for (here = model->CAPinstances; here != NULL ;
here=here->CAPnextInstance) { here=here->CAPnextInstance) {

Loading…
Cancel
Save