📄 b4temp.c
字号:
if (model->BSIM4PhiBSWGD <= 0.01) { model->BSIM4PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ if (model->BSIM4ijthdfwd <= 0.0) { model->BSIM4ijthdfwd = 0.1; fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4ijthdfwd); } if (model->BSIM4ijthsfwd <= 0.0) { model->BSIM4ijthsfwd = 0.1; fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4ijthsfwd); } if (model->BSIM4ijthdrev <= 0.0) { model->BSIM4ijthdrev = 0.1; fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4ijthdrev); } if (model->BSIM4ijthsrev <= 0.0) { model->BSIM4ijthsrev = 0.1; fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4ijthsrev); } if ((model->BSIM4xjbvd <= 0.0) && (model->BSIM4dioMod == 2)) { model->BSIM4xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4xjbvd); } else if ((model->BSIM4xjbvd < 0.0) && (model->BSIM4dioMod == 0)) { model->BSIM4xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4xjbvd); } if (model->BSIM4bvd <= 0.0) { model->BSIM4bvd = 10.0; fprintf(stderr, "BVD reset to %g.\n", model->BSIM4bvd); } if ((model->BSIM4xjbvs <= 0.0) && (model->BSIM4dioMod == 2)) { model->BSIM4xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4xjbvs); } else if ((model->BSIM4xjbvs < 0.0) && (model->BSIM4dioMod == 0)) { model->BSIM4xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4xjbvs); } if (model->BSIM4bvs <= 0.0) { model->BSIM4bvs = 10.0; fprintf(stderr, "BVS reset to %g.\n", model->BSIM4bvs); } /* loop through all the instances of the model */ for (here = model->BSIM4instances; here != NULL; here = here->BSIM4nextInstance) { if (here->BSIM4owner != ARCHme) continue; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM4l == pSizeDependParamKnot->Length) && (here->BSIM4w == pSizeDependParamKnot->Width) && (here->BSIM4nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } /* stress effect */ Ldrn = here->BSIM4l; if (Size_Not_Found) { pParam = (struct bsim4SizeDependParam *)malloc( sizeof(struct bsim4SizeDependParam)); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; pParam->Length = here->BSIM4l; pParam->Width = here->BSIM4w; pParam->NFinger = here->BSIM4nf; Lnew = here->BSIM4l + model->BSIM4xl ; Wnew = here->BSIM4w / here->BSIM4nf + model->BSIM4xw; T0 = pow(Lnew, model->BSIM4Lln); T1 = pow(Wnew, model->BSIM4Lwn); tmp1 = model->BSIM4Ll / T0 + model->BSIM4Lw / T1 + model->BSIM4Lwl / (T0 * T1); pParam->BSIM4dl = model->BSIM4Lint + tmp1; tmp2 = model->BSIM4Llc / T0 + model->BSIM4Lwc / T1 + model->BSIM4Lwlc / (T0 * T1); pParam->BSIM4dlc = model->BSIM4dlc + tmp2; pParam->BSIM4dlcig = model->BSIM4dlcig; T2 = pow(Lnew, model->BSIM4Wln); T3 = pow(Wnew, model->BSIM4Wwn); tmp1 = model->BSIM4Wl / T2 + model->BSIM4Ww / T3 + model->BSIM4Wwl / (T2 * T3); pParam->BSIM4dw = model->BSIM4Wint + tmp1; tmp2 = model->BSIM4Wlc / T2 + model->BSIM4Wwc / T3 + model->BSIM4Wwlc / (T2 * T3); pParam->BSIM4dwc = model->BSIM4dwc + tmp2; pParam->BSIM4dwj = model->BSIM4dwj + tmp2; pParam->BSIM4leff = Lnew - 2.0 * pParam->BSIM4dl; if (pParam->BSIM4leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weff = Wnew - 2.0 * pParam->BSIM4dw; if (pParam->BSIM4weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM4leffCV = Lnew - 2.0 * pParam->BSIM4dlc; if (pParam->BSIM4leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weffCV = Wnew - 2.0 * pParam->BSIM4dwc; if (pParam->BSIM4weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weffCJ = Wnew - 2.0 * pParam->BSIM4dwj; if (pParam->BSIM4weffCJ <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } if (model->BSIM4binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM4leff; Inv_W = 1.0e-6 / pParam->BSIM4weff; Inv_LW = 1.0e-12 / (pParam->BSIM4leff * pParam->BSIM4weff); } else { Inv_L = 1.0 / pParam->BSIM4leff; Inv_W = 1.0 / pParam->BSIM4weff; Inv_LW = 1.0 / (pParam->BSIM4leff * pParam->BSIM4weff); } pParam->BSIM4cdsc = model->BSIM4cdsc + model->BSIM4lcdsc * Inv_L + model->BSIM4wcdsc * Inv_W + model->BSIM4pcdsc * Inv_LW; pParam->BSIM4cdscb = model->BSIM4cdscb + model->BSIM4lcdscb * Inv_L + model->BSIM4wcdscb * Inv_W + model->BSIM4pcdscb * Inv_LW; pParam->BSIM4cdscd = model->BSIM4cdscd + model->BSIM4lcdscd * Inv_L + model->BSIM4wcdscd * Inv_W + model->BSIM4pcdscd * Inv_LW; pParam->BSIM4cit = model->BSIM4cit + model->BSIM4lcit * Inv_L + model->BSIM4wcit * Inv_W + model->BSIM4pcit * Inv_LW; pParam->BSIM4nfactor = model->BSIM4nfactor + model->BSIM4lnfactor * Inv_L + model->BSIM4wnfactor * Inv_W + model->BSIM4pnfactor * Inv_LW; pParam->BSIM4xj = model->BSIM4xj + model->BSIM4lxj * Inv_L + model->BSIM4wxj * Inv_W + model->BSIM4pxj * Inv_LW; pParam->BSIM4vsat = model->BSIM4vsat + model->BSIM4lvsat * Inv_L + model->BSIM4wvsat * Inv_W + model->BSIM4pvsat * Inv_LW; pParam->BSIM4at = model->BSIM4at + model->BSIM4lat * Inv_L + model->BSIM4wat * Inv_W + model->BSIM4pat * Inv_LW; pParam->BSIM4a0 = model->BSIM4a0 + model->BSIM4la0 * Inv_L + model->BSIM4wa0 * Inv_W + model->BSIM4pa0 * Inv_LW; pParam->BSIM4ags = model->BSIM4ags + model->BSIM4lags * Inv_L + model->BSIM4wags * Inv_W + model->BSIM4pags * Inv_LW; pParam->BSIM4a1 = model->BSIM4a1 + model->BSIM4la1 * Inv_L + model->BSIM4wa1 * Inv_W + model->BSIM4pa1 * Inv_LW; pParam->BSIM4a2 = model->BSIM4a2 + model->BSIM4la2 * Inv_L + model->BSIM4wa2 * Inv_W + model->BSIM4pa2 * Inv_LW; pParam->BSIM4keta = model->BSIM4keta + model->BSIM4lketa * Inv_L + model->BSIM4wketa * Inv_W + model->BSIM4pketa * Inv_LW; pParam->BSIM4nsub = model->BSIM4nsub + model->BSIM4lnsub * Inv_L + model->BSIM4wnsub * Inv_W + model->BSIM4pnsub * Inv_LW; pParam->BSIM4ndep = model->BSIM4ndep + model->BSIM4lndep * Inv_L + model->BSIM4wndep * Inv_W + model->BSIM4pndep * Inv_LW; pParam->BSIM4nsd = model->BSIM4nsd + model->BSIM4lnsd * Inv_L + model->BSIM4wnsd * Inv_W + model->BSIM4pnsd * Inv_LW; pParam->BSIM4phin = model->BSIM4phin + model->BSIM4lphin * Inv_L + model->BSIM4wphin * Inv_W + model->BSIM4pphin * Inv_LW; pParam->BSIM4ngate = model->BSIM4ngate + model->BSIM4lngate * Inv_L + model->BSIM4wngate * Inv_W + model->BSIM4pngate * Inv_LW; pParam->BSIM4gamma1 = model->BSIM4gamma1 + model->BSIM4lgamma1 * Inv_L + model->BSIM4wgamma1 * Inv_W + model->BSIM4pgamma1 * Inv_LW; pParam->BSIM4gamma2 = model->BSIM4gamma2 + model->BSIM4lgamma2 * Inv_L + model->BSIM4wgamma2 * Inv_W + model->BSIM4pgamma2 * Inv_LW; pParam->BSIM4vbx = model->BSIM4vbx + model->BSIM4lvbx * Inv_L + model->BSIM4wvbx * Inv_W + model->BSIM4pvbx * Inv_LW; pParam->BSIM4vbm = model->BSIM4vbm + model->BSIM4lvbm * Inv_L + model->BSIM4wvbm * Inv_W + model->BSIM4pvbm * Inv_LW; pParam->BSIM4xt = model->BSIM4xt + model->BSIM4lxt * Inv_L + model->BSIM4wxt * Inv_W + model->BSIM4pxt * Inv_LW; pParam->BSIM4vfb = model->BSIM4vfb + model->BSIM4lvfb * Inv_L + model->BSIM4wvfb * Inv_W + model->BSIM4pvfb * Inv_LW; pParam->BSIM4k1 = model->BSIM4k1 + model->BSIM4lk1 * Inv_L + model->BSIM4wk1 * Inv_W + model->BSIM4pk1 * Inv_LW; pParam->BSIM4kt1 = model->BSIM4kt1 + model->BSIM4lkt1 * Inv_L + model->BSIM4wkt1 * Inv_W + model->BSIM4pkt1 * Inv_LW;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -