Browse Source

change vdmos flag to thermal, not to confuse with b4soi

pre-master-46
dwarning 6 years ago
committed by Holger Vogt
parent
commit
791f18053f
  1. 4
      examples/vdmos/100W.sp
  2. 2
      examples/vdmos/self-heating.sp
  3. 8
      src/frontend/inpcom.c
  4. 2
      src/spicelib/devices/vdmos/vdmos.c
  5. 2
      src/spicelib/devices/vdmos/vdmosacld.c
  6. 4
      src/spicelib/devices/vdmos/vdmosask.c
  7. 6
      src/spicelib/devices/vdmos/vdmosdefs.h
  8. 2
      src/spicelib/devices/vdmos/vdmosload.c
  9. 2
      src/spicelib/devices/vdmos/vdmosnoi.c
  10. 6
      src/spicelib/devices/vdmos/vdmospar.c
  11. 6
      src/spicelib/devices/vdmos/vdmosset.c

4
examples/vdmos/100W.sp

@ -5,9 +5,9 @@
*R24 & R25 are optional output offset trimming *R24 & R25 are optional output offset trimming
* *
VTamb tamb 0 25 VTamb tamb 0 25
MQ1 +V N010 N012 tn tcn IRFP240 tnodeout
MQ1 +V N010 N012 tn tcn IRFP240 thermal
X1 tcn tamb case-ambient X1 tcn tamb case-ambient
MQ2 -V N020 N017 tp tcp IRFP9240 tnodeout
MQ2 -V N020 N017 tp tcp IRFP9240 thermal
X2 tcp tamb case-ambient X2 tcp tamb case-ambient
R1 OUT N017 .33 R1 OUT N017 .33
R2 N012 OUT .33 R2 N012 OUT .33

2
examples/vdmos/self-heating.sp

@ -1,5 +1,5 @@
VDMOS self heating test VDMOS self heating test
M1 D G 0 tj tc IRFP240 tnodeout
M1 D G 0 tj tc IRFP240 thermal
rthk tc 0 0.05 rthk tc 0 0.05
VG G 0 5V Pulse 0 10 0 1m 1m 100m 200m VG G 0 5V Pulse 0 10 0 1m 1m 100m 200m
*RD D D1 4 *RD D D1 4

8
src/frontend/inpcom.c

@ -6964,16 +6964,16 @@ static int inp_vdmos_model(struct card *deck)
card->line = new_line; card->line = new_line;
wl_free(wlb); wl_free(wlb);
} }
/* we have a VDMOS instance line with 'tnodeout' and thus need exactly 5 nodes
/* we have a VDMOS instance line with 'thermal' flag and thus need exactly 5 nodes
*/ */
else if (strstr(curr_line, "tnodeout")) {
else if (strstr(curr_line, "thermal")) {
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
curr_line = nexttok(curr_line); curr_line = nexttok(curr_line);
if (!ciprefix("tnodeout", curr_line)) {
if (!ciprefix("thermal", curr_line)) {
fprintf(cp_err, fprintf(cp_err,
"Error: We need exactly 5 nodes\n" "Error: We need exactly 5 nodes\n"
" drain, gate, source, tjunction, tcase\n" " drain, gate, source, tjunction, tcase\n"
" in VDMOS instance line\n"
" in VDMOS instance line with thermal model\n"
" %s\n", card->line); " %s\n", card->line);
return 1; return 1;
} }

2
src/spicelib/devices/vdmos/vdmos.c

@ -22,7 +22,7 @@ IFparm VDMOSpTable[] = { /* parameters */
IOPU("dtemp", VDMOS_DTEMP, IF_REAL, "Instance temperature difference"), IOPU("dtemp", VDMOS_DTEMP, IF_REAL, "Instance temperature difference"),
IP( "ic", VDMOS_IC, IF_REALVEC, "Vector of D-S, G-S voltages"), IP( "ic", VDMOS_IC, IF_REALVEC, "Vector of D-S, G-S voltages"),
IOP("tnodeout", VDMOS_TNODEOUT, IF_FLAG, "Thermal model switch on/off"),
IOP("thermal", VDMOS_THERMAL, IF_FLAG, "Thermal model switch on/off"),
OP( "id", VDMOS_CD, IF_REAL, "Drain current"), OP( "id", VDMOS_CD, IF_REAL, "Drain current"),
OP( "is", VDMOS_CS, IF_REAL, "Source current"), OP( "is", VDMOS_CS, IF_REAL, "Source current"),

2
src/spicelib/devices/vdmos/vdmosacld.c

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

4
src/spicelib/devices/vdmos/vdmosask.c

@ -50,8 +50,8 @@ VDMOSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
case VDMOS_OFF: case VDMOS_OFF:
value->iValue = here->VDMOSoff; value->iValue = here->VDMOSoff;
return(OK); return(OK);
case VDMOS_TNODEOUT:
value->iValue = here->VDMOStnodeout;
case VDMOS_THERMAL:
value->iValue = here->VDMOSthermal;
return(OK); return(OK);
case VDMOS_IC_VDS: case VDMOS_IC_VDS:
value->rValue = here->VDMOSicVDS; value->rValue = here->VDMOSicVDS;

6
src/spicelib/devices/vdmos/vdmosdefs.h

@ -64,7 +64,7 @@ typedef struct sVDMOSinstance {
double VDMOSdsConductance; /*conductance of drain to source:set in setup*/ double VDMOSdsConductance; /*conductance of drain to source:set in setup*/
double VDMOStemp; /* operating temperature of this instance */ double VDMOStemp; /* operating temperature of this instance */
double VDMOSdtemp; /* operating temperature of the instance relative to circuit temperature*/ double VDMOSdtemp; /* operating temperature of the instance relative to circuit temperature*/
int VDMOStnodeout; /* flag indicate self heating on */
int VDMOSthermal; /* flag indicate self heating on */
double VDMOStTransconductance; /* temperature corrected transconductance*/ double VDMOStTransconductance; /* temperature corrected transconductance*/
double VDMOStPhi; /* temperature corrected Phi */ double VDMOStPhi; /* temperature corrected Phi */
@ -157,7 +157,7 @@ typedef struct sVDMOSinstance {
unsigned VDMOSsNodePrimeSet :1; unsigned VDMOSsNodePrimeSet :1;
unsigned VDMOSicVDSGiven :1; unsigned VDMOSicVDSGiven :1;
unsigned VDMOSicVGSGiven :1; unsigned VDMOSicVGSGiven :1;
unsigned VDMOStnodeoutGiven : 1; /* flag indicate self heating on */
unsigned VDMOSthermalGiven : 1; /* flag indicate self heating on */
unsigned VDMOSvonGiven : 1; unsigned VDMOSvonGiven : 1;
unsigned VDMOSvdsatGiven :1; unsigned VDMOSvdsatGiven :1;
unsigned VDMOSmodeGiven :1; unsigned VDMOSmodeGiven :1;
@ -440,7 +440,7 @@ enum {
VDMOS_TEMP, VDMOS_TEMP,
VDMOS_M, VDMOS_M,
VDMOS_DTEMP, VDMOS_DTEMP,
VDMOS_TNODEOUT,
VDMOS_THERMAL,
}; };
/* model parameters */ /* model parameters */

2
src/spicelib/devices/vdmos/vdmosload.c

@ -104,7 +104,7 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt)
for (here = VDMOSinstances(model); here != NULL; for (here = VDMOSinstances(model); here != NULL;
here = VDMOSnextInstance(here)) { here = VDMOSnextInstance(here)) {
selfheat = (here->VDMOStnodeoutGiven) && (model->VDMOSrthjcGiven);
selfheat = (here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven);
if (selfheat) if (selfheat)
Check_mos = 1; Check_mos = 1;
else else

2
src/spicelib/devices/vdmos/vdmosnoi.c

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

6
src/spicelib/devices/vdmos/vdmospar.c

@ -61,9 +61,9 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->VDMOSicVGS = value->rValue; here->VDMOSicVGS = value->rValue;
here->VDMOSicVGSGiven = TRUE; here->VDMOSicVGSGiven = TRUE;
break; break;
case VDMOS_TNODEOUT:
here->VDMOStnodeout = (value->iValue != 0);
here->VDMOStnodeoutGiven = TRUE;
case VDMOS_THERMAL:
here->VDMOSthermal = (value->iValue != 0);
here->VDMOSthermalGiven = TRUE;
break; break;
case VDMOS_IC: case VDMOS_IC:
switch(value->v.numValue){ switch(value->v.numValue){

6
src/spicelib/devices/vdmos/vdmosset.c

@ -342,7 +342,7 @@ VDMOSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
here->VDIOposPrimeNode = here->VDMOSsNode; here->VDIOposPrimeNode = here->VDMOSsNode;
} }
if ((here->VDMOStnodeoutGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
if (here->VDMOStempNode == -1) { if (here->VDMOStempNode == -1) {
error = CKTmkVolt(ckt,&tmp,here->VDMOSname,"Tj"); error = CKTmkVolt(ckt,&tmp,here->VDMOSname,"Tj");
if (error) return(error); if (error) return(error);
@ -374,7 +374,7 @@ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\
return(E_NOMEM);\ return(E_NOMEM);\
} } while(0) } } while(0)
if ((here->VDMOStnodeoutGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
TSTALLOC(VDMOSTemptempPtr, VDMOStempNode, VDMOStempNode); TSTALLOC(VDMOSTemptempPtr, VDMOStempNode, VDMOStempNode);
TSTALLOC(VDMOSTempdpPtr, VDMOStempNode, VDMOSdNodePrime); TSTALLOC(VDMOSTempdpPtr, VDMOStempNode, VDMOSdNodePrime);
TSTALLOC(VDMOSTempspPtr, VDMOStempNode, VDMOSsNodePrime); TSTALLOC(VDMOSTempspPtr, VDMOStempNode, VDMOSsNodePrime);
@ -458,7 +458,7 @@ VDMOSunsetup(GENmodel *inModel, CKTcircuit *ckt)
CKTdltNNum(ckt, here->VDIOposPrimeNode); CKTdltNNum(ckt, here->VDIOposPrimeNode);
here->VDIOposPrimeNode = 0; here->VDIOposPrimeNode = 0;
if ((here->VDMOStnodeoutGiven) && (model->VDMOSrthjcGiven)) {
if ((here->VDMOSthermalGiven) && (model->VDMOSrthjcGiven)) {
if (here->VDMOStNodePrime > 0) if (here->VDMOStNodePrime > 0)
CKTdltNNum(ckt, here->VDMOStNodePrime); CKTdltNNum(ckt, here->VDMOStNodePrime);
here->VDMOStNodePrime = 0; here->VDMOStNodePrime = 0;

Loading…
Cancel
Save