Browse Source

Initial fix for Bug 710 -

"The log file appears blank when a VDMOS element is added".
The problen was caused by a crash during sensitivity analysis
caused by selecting parameters for wariation based on their
values.  That is not repeatable between passes.  The fix is to
remove that code, but it causes many more parameters to be used.
pre-master-46
Giles Atkinson 1 year ago
committed by Holger Vogt
parent
commit
c30bc423ba
  1. 2
      src/include/ngspice/sensgen.h
  2. 15
      src/spicelib/analysis/cktsgen.c
  3. 10
      src/spicelib/devices/asrc/asrctemp.c
  4. 9
      src/spicelib/devices/cap/captemp.c
  5. 9
      src/spicelib/devices/ind/indtemp.c
  6. 10
      src/spicelib/devices/res/restemp.c

2
src/include/ngspice/sensgen.h

@ -11,9 +11,7 @@ struct s_sgen {
int param, max_param;
int is_dc;
int is_instparam;
int is_q;
int is_principle;
int is_zerook;
};
extern sgen *sgen_init(CKTcircuit *ckt, int is_dc);

15
src/spicelib/analysis/cktsgen.c

@ -35,8 +35,6 @@ sgen_init(CKTcircuit *ckt, int is_dc)
sg->ptable = NULL;
sg->is_dc = is_dc;
sg->is_principle = 0;
sg->is_q = 0;
sg->is_zerook = 0;
sg->value = 0.0;
sgen_next(&sg); /* get the ball rolling XXX check return val? */
@ -212,23 +210,10 @@ int set_param(sgen *sg)
if (sg->is_dc &&
(sg->ptable[sg->param].dataType & (IF_AC | IF_AC_ONLY)))
return 0;
if ((sg->ptable[sg->param].dataType & IF_CHKQUERY) && !sg->is_q)
return 0;
if (sens_getp(sg, sg->ckt, &ifval))
return 0;
if (fabs(ifval.rValue) < 1e-30) {
if (sg->ptable[sg->param].dataType & IF_SETQUERY)
sg->is_q = 0;
if (!sg->is_zerook
&& !(sg->ptable[sg->param].dataType & IF_PRINCIPAL))
return 0;
} else if (sg->ptable[sg->param].dataType & (IF_SETQUERY|IF_ORQUERY))
sg->is_q = 1;
if (sg->ptable[sg->param].dataType & IF_PRINCIPAL)
sg->is_principle += 1;

10
src/spicelib/devices/asrc/asrctemp.c

@ -26,8 +26,14 @@ ASRCtemp(GENmodel *inModel, CKTcircuit *ckt)
here->ASRCdtemp = 0.0;
} else {
here->ASRCdtemp = 0.0;
if (here->ASRCdtempGiven)
printf("%s: Instance temperature specified, dtemp ignored\n", here->ASRCname);
if (here->ASRCdtempGiven &&
ckt->CKTcurJob && ckt->CKTcurJob->JOBtype != 9) {
/* Keep quiet in sensistivity analysis. */
printf("%s: Instance temperature specified, "
"dtemp ignored\n",
here->ASRCname);
}
}
}

9
src/spicelib/devices/cap/captemp.c

@ -41,10 +41,15 @@ CAPtemp(GENmodel *inModel, CKTcircuit *ckt)
if(!here->CAPdtempGiven) here->CAPdtemp = 0.0;
} else { /* CAPtempGiven */
here->CAPdtemp = 0.0;
if (here->CAPdtempGiven)
printf("%s: Instance temperature specified, dtemp ignored\n",
if (here->CAPdtempGiven &&
ckt->CKTcurJob && ckt->CKTcurJob->JOBtype != 9) {
/* Keep quiet in sensistivity analysis. */
printf("%s: Instance temperature specified, "
"dtemp ignored\n",
here->CAPname);
}
}
if (!here->CAPwidthGiven) {
here->CAPwidth = model->CAPdefWidth;

9
src/spicelib/devices/ind/indtemp.c

@ -37,10 +37,15 @@ INDtemp(GENmodel *inModel, CKTcircuit *ckt)
if(!here->INDdtempGiven) here->INDdtemp = 0.0;
} else { /* INDtempGiven */
here->INDdtemp = 0.0;
if (here->INDdtempGiven)
printf("%s: Instance temperature specified, dtemp ignored\n",
if (here->INDdtempGiven &&
ckt->CKTcurJob && ckt->CKTcurJob->JOBtype != 9) {
/* Keep quiet in sensistivity analysis. */
printf("%s: Instance temperature specified, "
"dtemp ignored\n",
here->INDname);
}
}
if (!here->INDscaleGiven) here->INDscale = 1.0;
if (!here->INDmGiven) here->INDm = 1.0;

10
src/spicelib/devices/res/restemp.c

@ -38,8 +38,14 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
here->RESdtemp = 0.0;
} else {
here->RESdtemp = 0.0;
if (here->RESdtempGiven)
printf("%s: Instance temperature specified, dtemp ignored\n", here->RESname);
if (here->RESdtempGiven &&
ckt->CKTcurJob && ckt->CKTcurJob->JOBtype != 9) {
/* Keep quiet in sensistivity analysis. */
printf("%s: Instance temperature specified, "
"dtemp ignored\n",
here->RESname);
}
}
RESupdate_conduct(here, TRUE);

Loading…
Cancel
Save