Browse Source

Add model parameter selft, to switch on self-heating, default: off (selft=0)

pre-master-46
Holger Vogt 3 years ago
parent
commit
ff77c583d7
  1. 3
      src/spicelib/devices/vbic/vbic.c
  2. 3
      src/spicelib/devices/vbic/vbicdefs.h
  3. 3
      src/spicelib/devices/vbic/vbicmask.c
  4. 4
      src/spicelib/devices/vbic/vbicmpar.c
  5. 6
      src/spicelib/devices/vbic/vbicsetup.c

3
src/spicelib/devices/vbic/vbic.c

@ -184,7 +184,8 @@ IFparm VBICmPTable[] = { /* model parameters */
IOP("vbc_max", VBIC_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"),
IOPR("bvbc", VBIC_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"),
IOP("vce_max", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch"),
IOPR("bvce", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch")
IOPR("bvce", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch"),
IOP("selft", VBIC_MOD_SELFT, IF_INTEGER, "0: self-heating off, 1: self-heating on")
};
char *VBICnames[] = {

3
src/spicelib/devices/vbic/vbicdefs.h

@ -457,6 +457,7 @@ typedef struct sVBICmodel { /* model structure for a vbic */
double VBICtempExpAVC;
double VBICthermalResist;
double VBICthermalCapacitance;
int VBICselft;
double VBICpunchThroughVoltageBC;
double VBICdeplCapCoeff1;
double VBICfixedCapacitanceCS;
@ -571,6 +572,7 @@ typedef struct sVBICmodel { /* model structure for a vbic */
unsigned VBICtempExpNFGiven : 1;
unsigned VBICtempExpAVCGiven : 1;
unsigned VBICthermalResistGiven : 1;
unsigned VBICselftGiven : 1;
unsigned VBICthermalCapacitanceGiven : 1;
unsigned VBICpunchThroughVoltageBCGiven : 1;
unsigned VBICdeplCapCoeff1Given : 1;
@ -734,6 +736,7 @@ enum {
VBIC_MOD_VBE_MAX,
VBIC_MOD_VBC_MAX,
VBIC_MOD_VCE_MAX,
VBIC_MOD_SELFT,
};
/* device questions */

3
src/spicelib/devices/vbic/vbicmask.c

@ -369,6 +369,9 @@ VBICmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value)
else
value->sValue = "pnp";
return(OK);
case VBIC_MOD_SELFT:
value->iValue = here->VBICselft;
return(OK);
default:
return(E_BADPARM);
}

4
src/spicelib/devices/vbic/vbicmpar.c

@ -509,6 +509,10 @@ VBICmParam(int param, IFvalue *value, GENmodel *inModel)
mods->VBICvceMax = value->rValue;
mods->VBICvceMaxGiven = TRUE;
break;
case VBIC_MOD_SELFT:
mods->VBICselft = value->iValue;
mods->VBICselftGiven = TRUE;
break;
default:
return(E_BADPARM);
}

6
src/spicelib/devices/vbic/vbicsetup.c

@ -391,6 +391,9 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(!model->VBICvceMaxGiven) {
model->VBICvceMax = 1e99;
}
if(!model->VBICselftGiven) {
model->VBICselft = 0;
}
/* loop through all the instances of the model */
for (here = VBICinstances(model); here != NULL ;
@ -472,7 +475,8 @@ VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
}
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0))
if((model->VBICthermalResistGiven) && (model->VBICthermalResist > 0.0)
&& model->VBICselftGiven && model->VBICselft == 1)
here->VBIC_selfheat = 1;
else
here->VBIC_selfheat = 0;

Loading…
Cancel
Save