diff --git a/src/spicelib/devices/bsim3v32/b3v32ld.c b/src/spicelib/devices/bsim3v32/b3v32ld.c index ab1f62fee..22c2646d6 100644 --- a/src/spicelib/devices/bsim3v32/b3v32ld.c +++ b/src/spicelib/devices/bsim3v32/b3v32ld.c @@ -363,8 +363,7 @@ for (; model != NULL; model = model->BSIM3v32nextModel) } else { - if ( - ACM_saturationCurrents( + error = ACM_saturationCurrents( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, @@ -384,7 +383,9 @@ for (; model != NULL; model = model->BSIM3v32nextModel) here->BSIM3v32sourcePerimeter, &DrainSatCurrent, &SourceSatCurrent - ) == 0) printf("load IDsat: %g ISsat: %g\n",DrainSatCurrent,SourceSatCurrent); + ); + if (error) + return(error); } if (SourceSatCurrent <= 0.0) { here->BSIM3v32gbs = ckt->CKTgmin; @@ -2530,8 +2531,7 @@ finished: } } else { - if( - ACM_junctionCapacitances( + error = ACM_junctionCapacitances( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, @@ -2556,7 +2556,9 @@ finished: &czbs, &czbssw, &czbsswg - ) == 0) printf("load Cda: %g Cdsw: %g Cdswg: %g Csa: %g Cssw: %g Csswg %g\n",czbd,czbdsw,czbdswg,czbs,czbssw,czbsswg); + ); + if (error) + return(error); } MJ = model->BSIM3v32bulkJctBotGradingCoeff; diff --git a/src/spicelib/devices/bsim3v32/b3v32temp.c b/src/spicelib/devices/bsim3v32/b3v32temp.c index 96b5493fe..42ea5f275 100644 --- a/src/spicelib/devices/bsim3v32/b3v32temp.c +++ b/src/spicelib/devices/bsim3v32/b3v32temp.c @@ -38,7 +38,7 @@ struct bsim3v32SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, Ldrn, Wdrn; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double Nvtm, SourceSatCurrent, DrainSatCurrent; -int Size_Not_Found; +int Size_Not_Found, error; /* loop through all the BSIM3v32 device models */ for (; model != NULL; model = model->BSIM3v32nextModel) @@ -887,8 +887,7 @@ int Size_Not_Found; } else /* ACM > 0 */ { - if ( - ACM_SourceDrainResistances( + error = ACM_SourceDrainResistances( model->BSIM3v32acmMod, model->BSIM3v32ld, model->BSIM3v32ldif, @@ -907,7 +906,9 @@ int Size_Not_Found; here->BSIM3v32sourceSquares, &(here->BSIM3v32drainConductance), &(here->BSIM3v32sourceConductance) - ) == 0 ) printf("temp RD: %g RS: %g\n",here->BSIM3v32drainConductance,here->BSIM3v32sourceConductance); + ); + if (error) + return(error); } if (here->BSIM3v32drainConductance > 0.0) here->BSIM3v32drainConductance = 1.0 @@ -951,8 +952,7 @@ int Size_Not_Found; } else /* ACM > 0 */ { - if ( - ACM_saturationCurrents( + error = ACM_saturationCurrents( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, @@ -972,8 +972,9 @@ int Size_Not_Found; here->BSIM3v32sourcePerimeter, &DrainSatCurrent, &SourceSatCurrent - ) == 0) printf("temp IDsat: %g ISsat: %g\n",DrainSatCurrent,SourceSatCurrent); - + ); + if (error) + return(error); } if ((SourceSatCurrent > 0.0) && (model->BSIM3v32ijth > 0.0)) { here->BSIM3v32vjsm = Nvtm * log(model->BSIM3v32ijth