Browse Source

FALLTHROUGH added

pre-master-46
Jim Monte 6 years ago
committed by Holger Vogt
parent
commit
a10be03c75
  1. 6
      src/spicelib/devices/hfet1/hfetparam.c
  2. 8
      src/spicelib/devices/hfet2/hfet2param.c
  3. 6
      src/spicelib/devices/hisim2/hsm2par.c
  4. 4
      src/spicelib/devices/hisimhv1/hsmhvpar.c
  5. 6
      src/spicelib/devices/hisimhv2/hsmhv2par.c
  6. 6
      src/spicelib/devices/isrc/isrcpar.c
  7. 6
      src/spicelib/devices/jfet/jfetpar.c
  8. 6
      src/spicelib/devices/jfet2/jfet2par.c
  9. 7
      src/spicelib/devices/ltra/ltraload.c
  10. 6
      src/spicelib/devices/ltra/ltrapar.c
  11. 6
      src/spicelib/devices/mes/mesparam.c
  12. 6
      src/spicelib/devices/mesa/mesaparam.c
  13. 6
      src/spicelib/devices/mos1/mos1par.c
  14. 30
      src/spicelib/devices/mos2/mos2dset.c
  15. 6
      src/spicelib/devices/mos2/mos2par.c
  16. 7
      src/spicelib/devices/mos3/mos3par.c
  17. 6
      src/spicelib/devices/mos6/mos6par.c
  18. 7
      src/spicelib/devices/mos9/mos9par.c
  19. 6
      src/spicelib/devices/soi3/soi3par.c
  20. 6
      src/spicelib/devices/tra/traparam.c
  21. 6
      src/spicelib/devices/vbic/vbicparam.c
  22. 6
      src/spicelib/devices/vdmos/vdmospar.c
  23. 11
      src/spicelib/devices/vsrc/vsrcpar.c

6
src/spicelib/devices/hfet1/hfetparam.c

@ -18,7 +18,7 @@ HFETAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case HFETA_LENGTH: case HFETA_LENGTH:
here->HFETAlength = value->rValue; here->HFETAlength = value->rValue;
here->HFETAlengthGiven = TRUE; here->HFETAlengthGiven = TRUE;
@ -43,7 +43,9 @@ HFETAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->HFETAoff = value->iValue; here->HFETAoff = value->iValue;
break; break;
case HFETA_IC: case HFETA_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->HFETAicVGS = *(value->v.vec.rVec+1); here->HFETAicVGS = *(value->v.vec.rVec+1);
here->HFETAicVGSGiven = TRUE; here->HFETAicVGSGiven = TRUE;

8
src/spicelib/devices/hfet2/hfet2param.c

@ -16,8 +16,8 @@ int HFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
HFET2instance *here = (HFET2instance*)inst; HFET2instance *here = (HFET2instance*)inst;
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case HFET2_LENGTH: case HFET2_LENGTH:
L = value->rValue; L = value->rValue;
here->HFET2lengthGiven = TRUE; here->HFET2lengthGiven = TRUE;
@ -34,7 +34,9 @@ int HFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->HFET2off = value->iValue; here->HFET2off = value->iValue;
break; break;
case HFET2_IC: case HFET2_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->HFET2icVGS = *(value->v.vec.rVec+1); here->HFET2icVGS = *(value->v.vec.rVec+1);
here->HFET2icVGSGiven = TRUE; here->HFET2icVGSGiven = TRUE;

6
src/spicelib/devices/hisim2/hsm2par.c

@ -133,15 +133,17 @@ int HSM2param(
here->HSM2_icVGS_Given = TRUE; here->HSM2_icVGS_Given = TRUE;
break; break;
case HSM2_IC: case HSM2_IC:
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) { switch (value->v.numValue) {
case 3: case 3:
here->HSM2_icVBS = *(value->v.vec.rVec + 2); here->HSM2_icVBS = *(value->v.vec.rVec + 2);
here->HSM2_icVBS_Given = TRUE; here->HSM2_icVBS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 2: case 2:
here->HSM2_icVGS = *(value->v.vec.rVec + 1); here->HSM2_icVGS = *(value->v.vec.rVec + 1);
here->HSM2_icVGS_Given = TRUE; here->HSM2_icVGS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 1: case 1:
here->HSM2_icVDS = *(value->v.vec.rVec); here->HSM2_icVDS = *(value->v.vec.rVec);
here->HSM2_icVDS_Given = TRUE; here->HSM2_icVDS_Given = TRUE;

4
src/spicelib/devices/hisimhv1/hsmhvpar.c

@ -102,11 +102,11 @@ int HSMHVparam(
case 3: case 3:
here->HSMHV_icVBS = *(value->v.vec.rVec + 2); here->HSMHV_icVBS = *(value->v.vec.rVec + 2);
here->HSMHV_icVBS_Given = TRUE; here->HSMHV_icVBS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 2: case 2:
here->HSMHV_icVGS = *(value->v.vec.rVec + 1); here->HSMHV_icVGS = *(value->v.vec.rVec + 1);
here->HSMHV_icVGS_Given = TRUE; here->HSMHV_icVGS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 1: case 1:
here->HSMHV_icVDS = *(value->v.vec.rVec); here->HSMHV_icVDS = *(value->v.vec.rVec);
here->HSMHV_icVDS_Given = TRUE; here->HSMHV_icVDS_Given = TRUE;

6
src/spicelib/devices/hisimhv2/hsmhv2par.c

@ -140,15 +140,17 @@ int HSMHV2param(
here->HSMHV2_icVGS_Given = TRUE; here->HSMHV2_icVGS_Given = TRUE;
break; break;
case HSMHV2_IC: case HSMHV2_IC:
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) { switch (value->v.numValue) {
case 3: case 3:
here->HSMHV2_icVBS = *(value->v.vec.rVec + 2); here->HSMHV2_icVBS = *(value->v.vec.rVec + 2);
here->HSMHV2_icVBS_Given = TRUE; here->HSMHV2_icVBS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 2: case 2:
here->HSMHV2_icVGS = *(value->v.vec.rVec + 1); here->HSMHV2_icVGS = *(value->v.vec.rVec + 1);
here->HSMHV2_icVGS_Given = TRUE; here->HSMHV2_icVGS_Given = TRUE;
/* FALLTHROUGH */
/* FALLTHROUGH */
case 1: case 1:
here->HSMHV2_icVDS = *(value->v.vec.rVec); here->HSMHV2_icVDS = *(value->v.vec.rVec);
here->HSMHV2_icVDS_Given = TRUE; here->HSMHV2_icVDS_Given = TRUE;

6
src/spicelib/devices/isrc/isrcpar.c

@ -38,7 +38,7 @@ ISRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case ISRC_DC: case ISRC_DC:
here->ISRCdcValue = value->rValue; here->ISRCdcValue = value->rValue;
@ -63,7 +63,9 @@ ISRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
break; break;
case ISRC_AC: case ISRC_AC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->ISRCacPhase = *(value->v.vec.rVec+1); here->ISRCacPhase = *(value->v.vec.rVec+1);
here->ISRCacPGiven = TRUE; here->ISRCacPGiven = TRUE;

6
src/spicelib/devices/jfet/jfetpar.c

@ -21,7 +21,7 @@ JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case JFET_TEMP: case JFET_TEMP:
here->JFETtemp = value->rValue+CONSTCtoK; here->JFETtemp = value->rValue+CONSTCtoK;
here->JFETtempGiven = TRUE; here->JFETtempGiven = TRUE;
@ -50,7 +50,9 @@ JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->JFEToff = (value->iValue != 0); here->JFEToff = (value->iValue != 0);
break; break;
case JFET_IC: case JFET_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->JFETicVGS = *(value->v.vec.rVec+1); here->JFETicVGS = *(value->v.vec.rVec+1);
here->JFETicVGSGiven = TRUE; here->JFETicVGSGiven = TRUE;

6
src/spicelib/devices/jfet2/jfet2par.c

@ -25,7 +25,7 @@ JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case JFET2_TEMP: case JFET2_TEMP:
here->JFET2temp = value->rValue+CONSTCtoK; here->JFET2temp = value->rValue+CONSTCtoK;
here->JFET2tempGiven = TRUE; here->JFET2tempGiven = TRUE;
@ -54,7 +54,9 @@ JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->JFET2off = (value->iValue != 0); here->JFET2off = (value->iValue != 0);
break; break;
case JFET2_IC: case JFET2_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->JFET2icVGS = *(value->v.vec.rVec+1); here->JFET2icVGS = *(value->v.vec.rVec+1);
here->JFET2icVGSGiven = TRUE; here->JFET2icVGSGiven = TRUE;

7
src/spicelib/devices/ltra/ltraload.c

@ -90,6 +90,8 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
break; break;
} }
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (model->LTRAspecialCase) { switch (model->LTRAspecialCase) {
case LTRA_MOD_RLC: case LTRA_MOD_RLC:
/* /*
@ -122,6 +124,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
model->LTRAtd, model->LTRAalpha, model->LTRAbeta, model->LTRAtd, model->LTRAalpha, model->LTRAbeta,
ckt->CKTtime, ckt->CKTtimePoints, ckt->CKTtimeIndex, ckt->CKTtime, ckt->CKTtimePoints, ckt->CKTtimeIndex,
model->LTRAchopReltol, &(model->LTRAauxIndex)); model->LTRAchopReltol, &(model->LTRAauxIndex));
/* FALLTHROUGH */
case LTRA_MOD_LC: case LTRA_MOD_LC:
@ -308,6 +311,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
*(here->LTRAibr2Pos2Ptr) += dummy1; *(here->LTRAibr2Pos2Ptr) += dummy1;
*(here->LTRAibr2Neg2Ptr) -= dummy1; *(here->LTRAibr2Neg2Ptr) -= dummy1;
/* end loading for convolution parts' first terms */ /* end loading for convolution parts' first terms */
/* FALLTHROUGH */
case LTRA_MOD_LC: case LTRA_MOD_LC:
/* /*
@ -591,6 +595,8 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
return (E_BADPARM); return (E_BADPARM);
} }
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (model->LTRAspecialCase) { switch (model->LTRAspecialCase) {
case LTRA_MOD_RLC: case LTRA_MOD_RLC:
@ -701,6 +707,7 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
/* end convolution of h3dash with v2 and v1 */ /* end convolution of h3dash with v2 and v1 */
/* FALLTHROUGH */
case LTRA_MOD_LC: case LTRA_MOD_LC:
/* begin lossless-like parts */ /* begin lossless-like parts */

6
src/spicelib/devices/ltra/ltrapar.c

@ -39,13 +39,13 @@ LTRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
switch (value->v.numValue) { switch (value->v.numValue) {
case 4: case 4:
here->LTRAinitCur2 = *(value->v.vec.rVec + 3); here->LTRAinitCur2 = *(value->v.vec.rVec + 3);
/* FALLTHROUGH */
/* FALLTHROUGH */
case 3: case 3:
here->LTRAinitVolt2 = *(value->v.vec.rVec + 2); here->LTRAinitVolt2 = *(value->v.vec.rVec + 2);
/* FALLTHROUGH */
/* FALLTHROUGH */
case 2: case 2:
here->LTRAinitCur1 = *(value->v.vec.rVec + 1); here->LTRAinitCur1 = *(value->v.vec.rVec + 1);
/* FALLTHROUGH */
/* FALLTHROUGH */
case 1: case 1:
here->LTRAinitVolt1 = *(value->v.vec.rVec); here->LTRAinitVolt1 = *(value->v.vec.rVec);
break; break;

6
src/spicelib/devices/mes/mesparam.c

@ -20,7 +20,7 @@ MESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case MES_AREA: case MES_AREA:
here->MESarea = value->rValue; here->MESarea = value->rValue;
here->MESareaGiven = TRUE; here->MESareaGiven = TRUE;
@ -41,7 +41,9 @@ MESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->MESoff = value->iValue; here->MESoff = value->iValue;
break; break;
case MES_IC: case MES_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->MESicVGS = *(value->v.vec.rVec+1); here->MESicVGS = *(value->v.vec.rVec+1);
here->MESicVGSGiven = TRUE; here->MESicVGSGiven = TRUE;

6
src/spicelib/devices/mesa/mesaparam.c

@ -19,7 +19,7 @@ MESAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case MESA_LENGTH: case MESA_LENGTH:
here->MESAlength = value->rValue; here->MESAlength = value->rValue;
here->MESAlengthGiven = TRUE; here->MESAlengthGiven = TRUE;
@ -45,7 +45,9 @@ MESAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->MESAoff = value->iValue; here->MESAoff = value->iValue;
break; break;
case MESA_IC: case MESA_IC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->MESAicVGS = *(value->v.vec.rVec+1); here->MESAicVGS = *(value->v.vec.rVec+1);
here->MESAicVGSGiven = TRUE; here->MESAicVGSGiven = TRUE;

6
src/spicelib/devices/mos1/mos1par.c

@ -28,7 +28,7 @@ MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
if (!cp_getvar("scale", CP_REAL, &scale, 0)) if (!cp_getvar("scale", CP_REAL, &scale, 0))
scale = 1; scale = 1;
switch(param) {
switch (param) {
case MOS1_TEMP: case MOS1_TEMP:
here->MOS1temp = value->rValue+CONSTCtoK; here->MOS1temp = value->rValue+CONSTCtoK;
here->MOS1tempGiven = TRUE; here->MOS1tempGiven = TRUE;
@ -89,7 +89,9 @@ MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->MOS1icVGSGiven = TRUE; here->MOS1icVGSGiven = TRUE;
break; break;
case MOS1_IC: case MOS1_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 3: case 3:
here->MOS1icVBS = *(value->v.vec.rVec+2); here->MOS1icVBS = *(value->v.vec.rVec+2);
here->MOS1icVBSGiven = TRUE; here->MOS1icVBSGiven = TRUE;

30
src/spicelib/devices/mos2/mos2dset.c

@ -193,8 +193,8 @@ MOS2dSetup(GENmodel *inModel, CKTcircuit *ckt)
* this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets * * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets *
*/ */
double arg;
double sarg;
double arg1;
double sarg1;
double a4[4],b4[4],x4[8],poly4[8]; double a4[4],b4[4],x4[8],poly4[8];
double beta1; double beta1;
double sphi = 0.0; /* square root of phi */ double sphi = 0.0; /* square root of phi */
@ -358,22 +358,22 @@ d_p.d3_pqr = 0.0;
d_phiMinVbs.d1_q = - d_phiMinVbs.d1_q; d_phiMinVbs.d1_q = - d_phiMinVbs.d1_q;
if (lvbs <= 0.0) { if (lvbs <= 0.0) {
sarg = sqrt(phiMinVbs);
sarg1 = sqrt(phiMinVbs);
SqrtDeriv(&d_sarg, &d_phiMinVbs); SqrtDeriv(&d_sarg, &d_phiMinVbs);
dsrgdb = -0.5/sarg;
dsrgdb = -0.5/sarg1;
InvDeriv(&d_dsrgdb,&d_sarg); InvDeriv(&d_dsrgdb,&d_sarg);
TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5);
} else { } else {
sphi = sqrt(here->MOS2tPhi); /*const*/ sphi = sqrt(here->MOS2tPhi); /*const*/
sphi3 = here->MOS2tPhi*sphi; /*const*/ sphi3 = here->MOS2tPhi*sphi; /*const*/
sarg = sphi/(1.0+0.5*lvbs/here->MOS2tPhi);
sarg1 = sphi/(1.0+0.5*lvbs/here->MOS2tPhi);
EqualDeriv(&d_sarg,&d_q); d_sarg.value = lvbs; EqualDeriv(&d_sarg,&d_q); d_sarg.value = lvbs;
TimesDeriv(&d_sarg,&d_sarg,0.5/here->MOS2tPhi); TimesDeriv(&d_sarg,&d_sarg,0.5/here->MOS2tPhi);
d_sarg.value += 1.0; d_sarg.value += 1.0;
InvDeriv(&d_sarg,&d_sarg); InvDeriv(&d_sarg,&d_sarg);
TimesDeriv(&d_sarg,&d_sarg,sphi); TimesDeriv(&d_sarg,&d_sarg,sphi);
dsrgdb = -0.5*sarg*sarg/sphi3;
dsrgdb = -0.5*sarg1*sarg1/sphi3;
MultDeriv(&d_dsrgdb,&d_sarg,&d_sarg); MultDeriv(&d_dsrgdb,&d_sarg,&d_sarg);
TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5/sphi3); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5/sphi3);
/* tmp = sarg/sphi3; */ /* tmp = sarg/sphi3; */
@ -422,7 +422,7 @@ d_p.d3_pqr = 0.0;
if ((model->MOS2gamma > 0.0) || if ((model->MOS2gamma > 0.0) ||
(model->MOS2substrateDoping > 0.0)) { (model->MOS2substrateDoping > 0.0)) {
xwd = model->MOS2xd*barg; xwd = model->MOS2xd*barg;
xws = model->MOS2xd*sarg;
xws = model->MOS2xd*sarg1;
TimesDeriv(&d_xwd,&d_barg,model->MOS2xd); TimesDeriv(&d_xwd,&d_barg,model->MOS2xd);
TimesDeriv(&d_xws,&d_sarg,model->MOS2xd); TimesDeriv(&d_xws,&d_sarg,model->MOS2xd);
@ -484,7 +484,7 @@ d_p.d3_pqr = 0.0;
dgddvb = 0.0; dgddvb = 0.0;
EqualDeriv(&d_dgddvb,&d_zero); EqualDeriv(&d_dgddvb,&d_zero);
} }
von = vbin+gamasd*sarg;
von = vbin+gamasd*sarg1;
MultDeriv(&d_von,&d_gamasd,&d_sarg); MultDeriv(&d_von,&d_gamasd,&d_sarg);
PlusDeriv(&d_von,&d_von,&d_vbin); PlusDeriv(&d_von,&d_von,&d_vbin);
/* /*
@ -497,7 +497,7 @@ d_p.d3_pqr = 0.0;
/* XXX constant per model */ /* XXX constant per model */
cfs = CHARGE*model->MOS2fastSurfaceStateDensity* cfs = CHARGE*model->MOS2fastSurfaceStateDensity*
1e4 /*(cm**2/m**2)*/; 1e4 /*(cm**2/m**2)*/;
cdonco = -(gamasd*dsrgdb + dgddvb*sarg) + factor;
cdonco = -(gamasd*dsrgdb + dgddvb*sarg1) + factor;
MultDeriv(&d_dummy,&d_dgddvb,&d_sarg); MultDeriv(&d_dummy,&d_dgddvb,&d_sarg);
MultDeriv(&d_cdonco,&d_gamasd,&d_dsrgdb); MultDeriv(&d_cdonco,&d_gamasd,&d_dsrgdb);
PlusDeriv(&d_cdonco,&d_cdonco,&d_dummy); PlusDeriv(&d_cdonco,&d_cdonco,&d_dummy);
@ -533,7 +533,7 @@ d_p.d3_pqr = 0.0;
/* /*
* compute some more useful quantities */ * compute some more useful quantities */
sarg3 = sarg*sarg*sarg;
sarg3 = sarg1*sarg1*sarg1;
CubeDeriv(&d_sarg3,&d_sarg); CubeDeriv(&d_sarg3,&d_sarg);
/* XXX constant per model */ /* XXX constant per model */
sbiarg = sqrt(here->MOS2tBulkPot); /*const*/ sbiarg = sqrt(here->MOS2tBulkPot); /*const*/
@ -599,7 +599,7 @@ line500:
vdsat = 0.0; vdsat = 0.0;
EqualDeriv(&d_vdsat,&d_zero); EqualDeriv(&d_vdsat,&d_zero);
} else { } else {
arg = sqrt(1.0+4.0*argv/gammd2);
arg1 = sqrt(1.0+4.0*argv/gammd2);
DivDeriv(&d_arg,&d_argv,&d_gammd2); DivDeriv(&d_arg,&d_argv,&d_gammd2);
TimesDeriv(&d_arg,&d_arg,4.0);d_arg.value += 1.0; TimesDeriv(&d_arg,&d_arg,4.0);d_arg.value += 1.0;
SqrtDeriv(&d_arg,&d_arg); SqrtDeriv(&d_arg,&d_arg);
@ -883,14 +883,14 @@ line500:
MultDeriv(&d_sargv,&d_argv,&d_argv); MultDeriv(&d_sargv,&d_argv,&d_argv);
d_sargv.value += 1.0; d_sargv.value += 1.0;
SqrtDeriv(&d_sargv,&d_sargv); SqrtDeriv(&d_sargv,&d_sargv);
arg = sqrt(argv+sargv);
arg1 = sqrt(argv+sargv);
PlusDeriv(&d_arg,&d_sargv,&d_argv); PlusDeriv(&d_arg,&d_sargv,&d_argv);
SqrtDeriv(&d_arg,&d_arg); SqrtDeriv(&d_arg,&d_arg);
xlfact = model->MOS2xd/(EffectiveLength*lvds); xlfact = model->MOS2xd/(EffectiveLength*lvds);
EqualDeriv(&d_xlfact,&d_r); d_xlfact.value = lvds; EqualDeriv(&d_xlfact,&d_r); d_xlfact.value = lvds;
InvDeriv(&d_xlfact,&d_xlfact); InvDeriv(&d_xlfact,&d_xlfact);
TimesDeriv(&d_xlfact,&d_xlfact,model->MOS2xd/EffectiveLength); TimesDeriv(&d_xlfact,&d_xlfact,model->MOS2xd/EffectiveLength);
xlamda = xlfact*arg;
xlamda = xlfact*arg1;
MultDeriv(&d_xlamda,&d_xlfact,&d_arg); MultDeriv(&d_xlamda,&d_xlfact,&d_arg);
} else { } else {
argv = (vgsx-vbin)/eta-vdsat; argv = (vgsx-vbin)/eta-vdsat;
@ -990,7 +990,7 @@ line610:
goto line1050; goto line1050;
} }
here->MOS2gds = beta1*(von-vbin-gammad*sarg)*exp(argg*
here->MOS2gds = beta1*(von-vbin-gammad*sarg1)*exp(argg*
(lvgs-von)); (lvgs-von));
MultDeriv(&d_dummy,&d_gammad,&d_sarg); MultDeriv(&d_dummy,&d_gammad,&d_sarg);
PlusDeriv(&d_dummy,&d_dummy,&d_vbin); PlusDeriv(&d_dummy,&d_dummy,&d_vbin);
@ -1011,7 +1011,7 @@ line610:
} }
here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg);
here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg1);
MultDeriv(&d_mos2gds,&d_gammad,&d_sarg); MultDeriv(&d_mos2gds,&d_gammad,&d_sarg);
PlusDeriv(&d_mos2gds,&d_mos2gds,&d_vbin); PlusDeriv(&d_mos2gds,&d_mos2gds,&d_vbin);
TimesDeriv(&d_mos2gds,&d_mos2gds,-1.0); TimesDeriv(&d_mos2gds,&d_mos2gds,-1.0);

6
src/spicelib/devices/mos2/mos2par.c

@ -29,7 +29,7 @@ MOS2param(int param, IFvalue *value, GENinstance *inst,
if (!cp_getvar("scale", CP_REAL, &scale, 0)) if (!cp_getvar("scale", CP_REAL, &scale, 0))
scale = 1; scale = 1;
switch(param) {
switch (param) {
case MOS2_TEMP: case MOS2_TEMP:
here->MOS2temp = value->rValue+CONSTCtoK; here->MOS2temp = value->rValue+CONSTCtoK;
here->MOS2tempGiven = TRUE; here->MOS2tempGiven = TRUE;
@ -90,7 +90,9 @@ MOS2param(int param, IFvalue *value, GENinstance *inst,
here->MOS2icVGSGiven = TRUE; here->MOS2icVGSGiven = TRUE;
break; break;
case MOS2_IC: case MOS2_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 3: case 3:
here->MOS2icVBS = *(value->v.vec.rVec+2); here->MOS2icVBS = *(value->v.vec.rVec+2);
here->MOS2icVBSGiven = TRUE; here->MOS2icVBSGiven = TRUE;

7
src/spicelib/devices/mos3/mos3par.c

@ -28,8 +28,7 @@ MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
if (!cp_getvar("scale", CP_REAL, &scale, 0)) if (!cp_getvar("scale", CP_REAL, &scale, 0))
scale = 1; scale = 1;
switch(param) {
switch (param) {
case MOS3_M: case MOS3_M:
here->MOS3m = value->rValue; here->MOS3m = value->rValue;
here->MOS3mGiven = TRUE; here->MOS3mGiven = TRUE;
@ -90,7 +89,9 @@ MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->MOS3dtempGiven = TRUE; here->MOS3dtempGiven = TRUE;
break; break;
case MOS3_IC: case MOS3_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 3: case 3:
here->MOS3icVBS = *(value->v.vec.rVec+2); here->MOS3icVBS = *(value->v.vec.rVec+2);
here->MOS3icVBSGiven = TRUE; here->MOS3icVBSGiven = TRUE;

6
src/spicelib/devices/mos6/mos6par.c

@ -21,7 +21,7 @@ MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case MOS6_TEMP: case MOS6_TEMP:
here->MOS6temp = value->rValue+CONSTCtoK; here->MOS6temp = value->rValue+CONSTCtoK;
here->MOS6tempGiven = TRUE; here->MOS6tempGiven = TRUE;
@ -82,7 +82,9 @@ MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->MOS6icVGSGiven = TRUE; here->MOS6icVGSGiven = TRUE;
break; break;
case MOS6_IC: case MOS6_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 3: case 3:
here->MOS6icVBS = *(value->v.vec.rVec+2); here->MOS6icVBS = *(value->v.vec.rVec+2);
here->MOS6icVBSGiven = TRUE; here->MOS6icVBSGiven = TRUE;

7
src/spicelib/devices/mos9/mos9par.c

@ -23,8 +23,7 @@ MOS9param(int param, IFvalue *value, GENinstance *inst,
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case MOS9_M: case MOS9_M:
here->MOS9m = value->rValue; here->MOS9m = value->rValue;
here->MOS9mGiven = TRUE; here->MOS9mGiven = TRUE;
@ -85,7 +84,9 @@ MOS9param(int param, IFvalue *value, GENinstance *inst,
here->MOS9dtempGiven = TRUE; here->MOS9dtempGiven = TRUE;
break; break;
case MOS9_IC: case MOS9_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 3: case 3:
here->MOS9icVBS = *(value->v.vec.rVec+2); here->MOS9icVBS = *(value->v.vec.rVec+2);
here->MOS9icVBSGiven = TRUE; here->MOS9icVBSGiven = TRUE;

6
src/spicelib/devices/soi3/soi3par.c

@ -36,7 +36,7 @@ SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case SOI3_L: case SOI3_L:
here->SOI3l = value->rValue; here->SOI3l = value->rValue;
here->SOI3lGiven = TRUE; here->SOI3lGiven = TRUE;
@ -133,7 +133,9 @@ SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->SOI3ct4Given = TRUE; here->SOI3ct4Given = TRUE;
break; break;
case SOI3_IC: case SOI3_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 4: case 4:
here->SOI3icVBS = *(value->v.vec.rVec+3); here->SOI3icVBS = *(value->v.vec.rVec+3);
here->SOI3icVBSGiven = TRUE; here->SOI3icVBSGiven = TRUE;

6
src/spicelib/devices/tra/traparam.c

@ -20,7 +20,7 @@ TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case TRA_RELTOL: case TRA_RELTOL:
here->TRAreltol = value->rValue; here->TRAreltol = value->rValue;
here->TRAreltolGiven = TRUE; here->TRAreltolGiven = TRUE;
@ -62,7 +62,9 @@ TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->TRAicC2Given = TRUE; here->TRAicC2Given = TRUE;
break; break;
case TRA_IC: case TRA_IC:
switch(value->v.numValue){
/* FALLTHROUGH ded to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 4: case 4:
here->TRAinitCur2 = *(value->v.vec.rVec+3); here->TRAinitCur2 = *(value->v.vec.rVec+3);
/* FALLTHROUGH */ /* FALLTHROUGH */

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

@ -26,7 +26,7 @@ VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case VBIC_AREA: case VBIC_AREA:
here->VBICarea = value->rValue; here->VBICarea = value->rValue;
here->VBICareaGiven = TRUE; here->VBICareaGiven = TRUE;
@ -55,7 +55,9 @@ VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select)
here->VBICmGiven = TRUE; here->VBICmGiven = TRUE;
break; break;
case VBIC_IC : case VBIC_IC :
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->VBICicVCE = *(value->v.vec.rVec+1); here->VBICicVCE = *(value->v.vec.rVec+1);
here->VBICicVCEGiven = TRUE; here->VBICicVCEGiven = TRUE;

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

@ -29,7 +29,7 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
if (!cp_getvar("scale", CP_REAL, &scale, 0)) if (!cp_getvar("scale", CP_REAL, &scale, 0))
scale = 1; scale = 1;
switch(param) {
switch (param) {
case VDMOS_TEMP: case VDMOS_TEMP:
here->VDMOStemp = value->rValue+CONSTCtoK; here->VDMOStemp = value->rValue+CONSTCtoK;
here->VDMOStempGiven = TRUE; here->VDMOStempGiven = TRUE;
@ -58,7 +58,9 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->VDMOSthermalGiven = TRUE; here->VDMOSthermalGiven = TRUE;
break; break;
case VDMOS_IC: case VDMOS_IC:
switch(value->v.numValue){
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->VDMOSicVGS = *(value->v.vec.rVec+1); here->VDMOSicVGS = *(value->v.vec.rVec+1);
here->VDMOSicVGSGiven = TRUE; here->VDMOSicVGSGiven = TRUE;

11
src/spicelib/devices/vsrc/vsrcpar.c

@ -38,8 +38,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
NG_IGNORE(select); NG_IGNORE(select);
switch(param) {
switch (param) {
case VSRC_DC: case VSRC_DC:
here->VSRCdcValue = value->rValue; here->VSRCdcValue = value->rValue;
here->VSRCdcGiven = TRUE; here->VSRCdcGiven = TRUE;
@ -58,7 +57,9 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
break; break;
case VSRC_AC: case VSRC_AC:
switch(value->v.numValue) {
/* FALLTHROUGH added to suppress GCC warning due to
* -Wimplicit-fallthrough flag */
switch (value->v.numValue) {
case 2: case 2:
here->VSRCacPhase = *(value->v.vec.rVec+1); here->VSRCacPhase = *(value->v.vec.rVec+1);
here->VSRCacPGiven = TRUE; here->VSRCacPGiven = TRUE;
@ -163,7 +164,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
case VSRC_D_F1: case VSRC_D_F1:
here->VSRCdF1given = TRUE; here->VSRCdF1given = TRUE;
here->VSRCdGiven = TRUE; here->VSRCdGiven = TRUE;
switch(value->v.numValue) {
switch (value->v.numValue) {
case 2: case 2:
here->VSRCdF1phase = *(value->v.vec.rVec+1); here->VSRCdF1phase = *(value->v.vec.rVec+1);
here->VSRCdF1mag = *(value->v.vec.rVec); here->VSRCdF1mag = *(value->v.vec.rVec);
@ -184,7 +185,7 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
case VSRC_D_F2: case VSRC_D_F2:
here->VSRCdF2given = TRUE; here->VSRCdF2given = TRUE;
here->VSRCdGiven = TRUE; here->VSRCdGiven = TRUE;
switch(value->v.numValue) {
switch (value->v.numValue) {
case 2: case 2:
here->VSRCdF2phase = *(value->v.vec.rVec+1); here->VSRCdF2phase = *(value->v.vec.rVec+1);
here->VSRCdF2mag = *(value->v.vec.rVec); here->VSRCdF2mag = *(value->v.vec.rVec);

Loading…
Cancel
Save