📄 b4pzld.c
字号:
} sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM4gm; Gmbs = -here->BSIM4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -(here->BSIM4gbds); gbbdp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4gbgs; gbspsp = here->BSIM4gbds; gbspb = here->BSIM4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcdg; gIstotd = here->BSIM4gIgcds; gIstots = here->BSIM4gIgss + here->BSIM4gIgcdd; gIstotb = here->BSIM4gIgcdb; gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcsg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcss; gIdtots = here->BSIM4gIgcsd; gIdtotb = here->BSIM4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbs; gIbtots = here->BSIM4gIgbd; gIbtotb = here->BSIM4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4vges) - *(ckt->CKTstates[0] + here->BSIM4vgs); else if (here->BSIM4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4vgms) - *(ckt->CKTstates[0] + here->BSIM4vgs); if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgs * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgd * T0; gcrgb = here->BSIM4gcrgb * T0; gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4acnqsMod == 0) { if (here->BSIM4rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4cggb; xcgdb = here->BSIM4cgsb; xcgsb = here->BSIM4cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb); xcsgb = here->BSIM4cdgb; xcbgb = here->BSIM4cbgb; } else { xcggb = here->BSIM4cggb + cgdo + cgso + pParam->BSIM4cgbo; xcgdb = here->BSIM4cgsb - cgdo; xcgsb = here->BSIM4cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb + cgdo); xcsgb = here->BSIM4cdgb - cgso; xcbgb = here->BSIM4cbgb - pParam->BSIM4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4capbd + cgdo - (here->BSIM4cgsb + here->BSIM4cbsb + here->BSIM4cdsb); xcdsb = -(here->BSIM4cgdb + here->BSIM4cbdb + here->BSIM4cddb); xcsdb = here->BSIM4cdsb; xcssb = here->BSIM4cddb + here->BSIM4capbs + cgso; if (!here->BSIM4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4cbsb - here->BSIM4capbd; xcbsb = here->BSIM4cbdb - here->BSIM4capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) + here->BSIM4capbd; xcsbb = -(here->BSIM4cddb + here->BSIM4cdgb + here->BSIM4cdsb); xcbdb = here->BSIM4cbsb; xcbsb = here->BSIM4cbdb; xcdbdb = -here->BSIM4capbd; xcsbsb = -here->BSIM4capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4gtg; xgtd = here->BSIM4gts; xgts = here->BSIM4gtd; xgtb = here->BSIM4gtb; xcqgb = here->BSIM4cqgb; xcqdb = here->BSIM4cqsb; xcqsb = here->BSIM4cqdb; xcqbb = here->BSIM4cqbb; CoxWL = model->BSIM4coxe * here->pParam->BSIM4weffCV * here->BSIM4nf * here->pParam->BSIM4leffCV; qcheq = -(here->BSIM4qgate + here->BSIM4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM4qdrn / qcheq; Css = here->BSIM4cddb; Cds = -(here->BSIM4cgdb + here->BSIM4cddb + here->BSIM4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4cdgb; Cdg = -(here->BSIM4cggb + here->BSIM4cdgb + here->BSIM4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4cdsb; Cdd = -(here->BSIM4cgsb + here->BSIM4cdsb + here->BSIM4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } if (model->BSIM4rdsMod == 1) { gstot = here->BSIM4gstot; gstotd = here->BSIM4gstotd; gstotg = here->BSIM4gstotg; gstots = here->BSIM4gstots - gstot; gstotb = here->BSIM4gstotb; gdtot = here->BSIM4gdtot; gdtotd = here->BSIM4gdtotd - gdtot; gdtotg = here->BSIM4gdtotg; gdtots = here->BSIM4gdtots; gdtotb = here->BSIM4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } T1 = *(ckt->CKTstate0 + here->BSIM4qdef) * here->BSIM4gtau; gds = here->BSIM4gds; /* * Loading PZ matrix */ m = here->BSIM4m; if (!model->BSIM4rdsMod) { gdpr = here->BSIM4drainConductance; gspr = here->BSIM4sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4rbodyMod) { gjbd = here->BSIM4gbd; gjbs = here->BSIM4gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4grgeltd; if (here->BSIM4rgateMod == 1) { *(here->BSIM4GEgePtr) += m * geltd;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -