VDMOS handle thermal as a flag

This commit is contained in:
dwarning 2020-09-25 21:05:12 +02:00 committed by Holger Vogt
parent cbe02d9265
commit 099e2c13eb
7 changed files with 7 additions and 9 deletions

View File

@ -35,7 +35,7 @@ VDMOSacLoad(GENmodel *inModel, CKTcircuit *ckt)
for(here = VDMOSinstances(model); here!= NULL;
here = VDMOSnextInstance(here)) {
selfheat = (here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven);
selfheat = (here->VDMOSthermal) && (model->VDMOSrthjcGiven);
if (here->VDMOSmode < 0) {
xnrm=0;
xrev=1;

View File

@ -44,7 +44,7 @@ VDMOSconvTest(GENmodel *inModel, CKTcircuit *ckt)
delvds = vds - *(ckt->CKTstate0 + here->VDMOSvds);
delvgd = vgd-vgdo;
selfheat = (here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven);
selfheat = (here->VDMOSthermal) && (model->VDMOSrthjcGiven);
if (selfheat) {
delTemp = *(ckt->CKTrhs + here->VDMOStempNode);
deldelTemp = delTemp - *(ckt->CKTstate0 + here->VDMOSdelTemp);

View File

@ -155,7 +155,6 @@ typedef struct sVDMOSinstance {
unsigned VDMOSsNodePrimeSet :1;
unsigned VDMOSicVDSGiven :1;
unsigned VDMOSicVGSGiven :1;
unsigned VDMOSthermalGiven : 1; /* flag indicate self heating on */
unsigned VDMOSvonGiven : 1;
unsigned VDMOSvdsatGiven :1;
unsigned VDMOSmodeGiven :1;

View File

@ -80,7 +80,7 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt)
here = VDMOSnextInstance(here)) {
Temp = here->VDMOStemp;
selfheat = (here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven);
selfheat = (here->VDMOSthermal) && (model->VDMOSrthjcGiven);
if (selfheat)
Check_th = 1;
else

View File

@ -91,7 +91,7 @@ VDMOSnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt,
switch (mode) {
case N_DENS:
if ((inst->VDMOSthermalGiven) && (model->VDMOSrthjcGiven))
if ((inst->VDMOSthermal) && (model->VDMOSrthjcGiven))
tempRatioSH = inst->VDMOSTempSH / ckt->CKTtemp;
else
tempRatioSH = 1.0;

View File

@ -55,7 +55,6 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
break;
case VDMOS_THERMAL:
here->VDMOSthermal = (value->iValue != 0);
here->VDMOSthermalGiven = TRUE;
break;
case VDMOS_IC:
/* FALLTHROUGH added to suppress GCC warning due to

View File

@ -374,7 +374,7 @@ VDMOSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
here->VDIOposPrimeNode = here->VDMOSsNode;
}
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermal) && (model->VDMOSrthjcGiven)) {
if (here->VDMOStempNode == -1) {
error = CKTmkVolt(ckt,&tmp,here->VDMOSname,"Tj");
if (error) return(error);
@ -435,7 +435,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
TSTALLOC(VDIORPsPtr, VDIOposPrimeNode, VDMOSsNode);
TSTALLOC(VDIORPrpPtr, VDIOposPrimeNode, VDIOposPrimeNode);
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermal) && (model->VDMOSrthjcGiven)) {
TSTALLOC(VDMOSTemptempPtr, VDMOStempNode, VDMOStempNode); /* Transistor thermal contribution */
TSTALLOC(VDMOSTempdpPtr, VDMOStempNode, VDMOSdNodePrime);
TSTALLOC(VDMOSTempspPtr, VDMOStempNode, VDMOSsNodePrime);
@ -498,7 +498,7 @@ VDMOSunsetup(GENmodel *inModel, CKTcircuit *ckt)
CKTdltNNum(ckt, here->VDIOposPrimeNode);
here->VDIOposPrimeNode = 0;
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermal) && (model->VDMOSrthjcGiven)) {
if (here->VDMOStNodePrime > 0)
CKTdltNNum(ckt, here->VDMOStNodePrime);
here->VDMOStNodePrime = 0;