📄 b4check.c
字号:
if (model->BSIM4toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4toxp); printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4toxp); } if (model->BSIM4toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4toxm); printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4toxm); } if (pParam->BSIM4ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", pParam->BSIM4ndep); printf("Warning: Ndep = %g may be too small.\n", pParam->BSIM4ndep); } else if (pParam->BSIM4ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", pParam->BSIM4ndep); printf("Warning: Ndep = %g may be too large.\n", pParam->BSIM4ndep); } if (pParam->BSIM4nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM4nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM4nsub); } else if (pParam->BSIM4nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM4nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM4nsub); } if ((pParam->BSIM4ngate > 0.0) && (pParam->BSIM4ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4ngate); } if (pParam->BSIM4dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM4dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4dvt0); } if (fabs(1.0e-8 / (pParam->BSIM4w0 + pParam->BSIM4weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); }/* Check subthreshold parameters */ if (pParam->BSIM4nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM4nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4nfactor); } if (pParam->BSIM4cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM4cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4cdsc); } if (pParam->BSIM4cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM4cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4cdscd); }/* Check DIBL parameters */ if (here->BSIM4eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", here->BSIM4eta0); printf("Warning: Eta0 = %g is negative.\n", here->BSIM4eta0); } /* Check Abulk parameters */ if (fabs(1.0e-8 / (pParam->BSIM4b1 + pParam->BSIM4weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM4a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4a2); pParam->BSIM4a2 = 0.01; } else if (pParam->BSIM4a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4a2); pParam->BSIM4a2 = 1.0; pParam->BSIM4a1 = 0.0; } if (pParam->BSIM4prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4prwg); pParam->BSIM4prwg = 0.0; } if (pParam->BSIM4rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4rdsw); pParam->BSIM4rdsw = 0.0; pParam->BSIM4rds0 = 0.0; } if (pParam->BSIM4rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rds0); pParam->BSIM4rds0 = 0.0; } if (pParam->BSIM4rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rdswmin); pParam->BSIM4rdswmin = 0.0; } if (pParam->BSIM4pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4pscbe2); } if (pParam->BSIM4vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4vsattemp); } if((model->BSIM4lambdaGiven) && (pParam->BSIM4lambda > 0.0) ) { if (pParam->BSIM4lambda > 1.0e-9) { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4lambda); printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4lambda); } } if((model->BSIM4vtlGiven) && (pParam->BSIM4vtl > 0.0) ) { if (pParam->BSIM4vtl < 6.0e4) { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4vtl); printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4vtl); } if (pParam->BSIM4xn < 3.0) { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4xn); printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4xn); pParam->BSIM4xn = 3.0; } if (model->BSIM4lc < 0.0) { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4lc); printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4lc); pParam->BSIM4lc = 0.0; } } if (pParam->BSIM4pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4pdibl1); } if (pParam->BSIM4pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4pdibl2); }/* Check stress effect parameters */ if((here->BSIM4sa > 0.0) && (here->BSIM4sb > 0.0) && ((here->BSIM4nf == 1.0) || ((here->BSIM4nf > 1.0) && (here->BSIM4sd > 0.0))) ) { if (model->BSIM4lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4lodk2); } if (model->BSIM4lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4lodeta0); } }/* Check gate resistance parameters */ if (here->BSIM4rgateMod == 1) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->BSIM4rgateMod == 2) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); else if (pParam->BSIM4xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } if (here->BSIM4rgateMod == 3) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (pParam->BSIM4xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } /* Check capacitance parameters */ if (pParam->BSIM4noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4noff); } if (pParam->BSIM4voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4voffcv); } if (pParam->BSIM4moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4moin); } if (pParam->BSIM4moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4moin); } if(model->BSIM4capMod ==2) { if (pParam->BSIM4acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4acde); } if (pParam->BSIM4acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4acde); } }/* Check overlap capacitance parameters */ if (model->BSIM4cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4cgdo); model->BSIM4cgdo = 0.0; } if (model->BSIM4cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4cgso); model->BSIM4cgso = 0.0; } if (model->BSIM4tnoiMod == 1) { if (model->BSIM4tnoia < 0.0) { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4tnoia); printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4tnoia); model->BSIM4tnoia = 0.0; } if (model->BSIM4tnoib < 0.0) { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4tnoib); printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4tnoib); model->BSIM4tnoib = 0.0; } if (model->BSIM4rnoia < 0.0) { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4rnoia); printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4rnoia); model->BSIM4rnoia = 0.0; } if (model->BSIM4rnoib < 0.0) { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4rnoib); printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4rnoib); model->BSIM4rnoib = 0.0; } } if (model->BSIM4SjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njs = %g is negative.\n", model->BSIM4SjctEmissionCoeff); printf("Warning: Njs = %g is negative.\n", model->BSIM4SjctEmissionCoeff); } if (model->BSIM4DjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njd = %g is negative.\n", model->BSIM4DjctEmissionCoeff); printf("Warning: Njd = %g is negative.\n", model->BSIM4DjctEmissionCoeff); } if (model->BSIM4njtstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4njtstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4njtstemp, ckt->CKTtemp); } if (model->BSIM4njtsswtemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4njtsswtemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4njtsswtemp, ckt->CKTtemp); } if (model->BSIM4njtsswgtemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4njtsswgtemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4njtsswgtemp, ckt->CKTtemp); } if (model->BSIM4vtss < 0.0) { fprintf(fplog, "Warning: Vtss = %g is negative.\n", model->BSIM4vtss); printf("Warning: Vtss = %g is negative.\n", model->BSIM4vtss); } if (model->BSIM4vtsd < 0.0) { fprintf(fplog, "Warning: Vtsd = %g is negative.\n", model->BSIM4vtsd); printf("Warning: Vtsd = %g is negative.\n", model->BSIM4vtsd); } if (model->BSIM4vtssws < 0.0) { fprintf(fplog, "Warning: Vtssws = %g is negative.\n", model->BSIM4vtssws); printf("Warning: Vtssws = %g is negative.\n", model->BSIM4vtssws); } if (model->BSIM4vtsswd < 0.0) { fprintf(fplog, "Warning: Vtsswd = %g is negative.\n", model->BSIM4vtsswd); printf("Warning: Vtsswd = %g is negative.\n", model->BSIM4vtsswd); } if (model->BSIM4vtsswgs < 0.0) { fprintf(fplog, "Warning: Vtsswgs = %g is negative.\n", model->BSIM4vtsswgs); printf("Warning: Vtsswgs = %g is negative.\n", model->BSIM4vtsswgs); } if (model->BSIM4vtsswgd < 0.0) { fprintf(fplog, "Warning: Vtsswgd = %g is negative.\n", model->BSIM4vtsswgd); printf("Warning: Vtsswgd = %g is negative.\n", model->BSIM4vtsswgd); } if (model->BSIM4ntnoi < 0.0) { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4ntnoi); printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4ntnoi); model->BSIM4ntnoi = 0.0; } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -