⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 soi3load.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
📖 第 1 页 / 共 5 页
字号:
                /* End JimB */              }              Dvgx0_Dvdb  = pDvgx0_Dvg*(sigma);              Dvgx0_DdeltaT  = pDvgx0_Dvg*(-model->SOI3chiFB);            } else {              Dvgx0_Dvgfb = pDvgx0_Dvg  = 1;              Dvgx0_Dvsb  = (-sigma);              Dvgx0_Dvdb  = (sigma);              Dvgx0_DdeltaT  = (-model->SOI3chiFB);            }            if (vgxLtrans) {              DvgxL_Dvgfb = pDvgxL_Dvg = EgxL/(1+EgxL);              DvgxL_Dvsb  = pDvgxL_Dvg * (-sigma);              if (ALtrans) {                /* JimB - 27/8/98 */                /* Get divide by zero errors when ALx is equal to zero */                /* Temporary fix - add small constant to denominator */                /*DvgxL_Dvdb  = pDvgxL_Dvg * (sigma) +                               (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/sqrt(ALx))*                               (EAL/(1+EAL)); */                DvgxL_Dvdb  = pDvgxL_Dvg * (sigma) +                               (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/(sqrt(ALx)+1e-25))*                               (EAL/(1+EAL));                /* End JimB */              } else {                /* JimB - 27/8/97 */                /* Temporary fix - add small constant to denominator *//*                DvgxL_Dvdb  = pDvgxL_Dvg * (sigma) +                               (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/sqrt(AL)); */                DvgxL_Dvdb  = pDvgxL_Dvg * (sigma) +                               (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/(sqrt(AL)+1e-25));                /* End JimB */              }              DvgxL_DdeltaT  = pDvgxL_Dvg * (-model->SOI3chiFB);            } else {              DvgxL_Dvgfb = 1;              DvgxL_Dvsb  = (-sigma);              DvgxL_Dvdb  = (sigma);              DvgxL_DdeltaT  = (-model->SOI3chiFB);            }            pDpsi_si0_Dvsb = 1 - (2*vt*eta_s*L0+vt*gamma*gamma)/(L0*L0-gamma*gamma*A0);            pDpsi_siL_Dvdb = 1 - (2*vt*eta_s*LL+vt*gamma*gamma)/(LL*LL-gamma*gamma*AL);            Dpsi_si0_Dvgfb = pDpsi_si0_Dvgx0*Dvgx0_Dvgfb;            Dpsi_si0_Dvsb =  pDpsi_si0_Dvgx0*Dvgx0_Dvsb + pDpsi_si0_Dvsb;            Dpsi_si0_Dvdb =  pDpsi_si0_Dvgx0*Dvgx0_Dvdb;            Dpsi_si0_DdeltaT =  model->SOI3chiPHI +                                pDpsi_si0_Dvgx0*Dvgx0_DdeltaT;            Dpsi_siL_Dvgfb = pDpsi_siL_DvgxL*DvgxL_Dvgfb;            Dpsi_siL_Dvsb =  pDpsi_siL_DvgxL*DvgxL_Dvsb;            Dpsi_siL_Dvdb =  pDpsi_siL_DvgxL*DvgxL_Dvdb + pDpsi_siL_Dvdb;            Dpsi_siL_DdeltaT =  model->SOI3chiPHI +                                pDpsi_siL_DvgxL*DvgxL_DdeltaT;/* now we can get full deriv of first guess    but also, partials of psi_s0 and psi_sL, the   final values have similar structure, so do   them now as well */  /* deriv of psi_s etc wrt psi_si must be according to transform used */            if (Ess0_trans) {              if (psi_s0_trans) {                tmp  = (Esi0/(1+Ess0+Esi0))/(1+Ess0);                tmp1 = (Esi0/(1+Ess0+Esi0))*(Ess0/(1+Ess0));              } else {                tmp  = 1/(1+Ess0);                tmp1 = Ess0*tmp;              }              Dpsi_st0_Dvgfb = tmp*Dpsi_si0_Dvgfb + tmp1*Dpsi_ss_Dvgfb;              Dpsi_st0_Dvsb  = tmp*Dpsi_si0_Dvsb + tmp1*Dpsi_ss_Dvsb;              Dpsi_st0_Dvdb  = tmp*Dpsi_si0_Dvdb + tmp1*Dpsi_ss_Dvdb;              Dpsi_st0_DdeltaT = tmp*Dpsi_si0_DdeltaT + tmp1*Dpsi_ss_DdeltaT;            } else {              Dpsi_st0_Dvgfb = Dpsi_ss_Dvgfb;              Dpsi_st0_Dvdb = Dpsi_ss_Dvdb;              Dpsi_st0_Dvsb = Dpsi_ss_Dvsb;              Dpsi_st0_DdeltaT = Dpsi_ss_DdeltaT;            }/* now some itsy bitsy quantities useful all over the shop */  /* Ddelta_Dpsi_st0 is defined earlier with delta to allow     change of delta expression in one place */            pDBf_Dpsi_st0 = 0.5/sqt0 - psi_st0*pDdelta_Dpsi_st0 - delta;            DvGT_Dvgfb = 1 - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvgfb;            DvGT_Dvsb  = (-sigma) - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvsb;            DvGT_Dvdb  = (sigma) - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvdb;            DvGT_DdeltaT  = (-model->SOI3chiFB) - gamma*pDBf_Dpsi_st0*Dpsi_st0_DdeltaT;            Dalpha_Dvgfb = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvgfb;            Dalpha_Dvsb  = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvsb;            Dalpha_Dvdb  = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvdb;            Dalpha_DdeltaT  = gamma*pDdelta_Dpsi_st0*Dpsi_st0_DdeltaT;/* Now for saturation stuff psi_sLsat *//* NB no need for special case, theta2=0 ==> Mmob=-theta/2 */            if (PSI != 0) { /* stops unnecessary math if PSI = 0 */              DPSI_Dvgfb = (DvGT_Dvgfb - (vGT/alpha)*Dalpha_Dvgfb                           )/alpha - Dpsi_st0_Dvgfb;              DPSI_Dvsb = (DvGT_Dvsb - (vGT/alpha)*Dalpha_Dvsb                           )/alpha - Dpsi_st0_Dvsb;              DPSI_Dvdb = (DvGT_Dvdb - (vGT/alpha)*Dalpha_Dvdb                           )/alpha - Dpsi_st0_Dvdb;              DPSI_DdeltaT = (DvGT_DdeltaT - (vGT/alpha)*Dalpha_DdeltaT                           )/alpha - Dpsi_st0_DdeltaT;              D = 2*(1+model->SOI3theta*vGBF)*                  sqrt(1 + (2*Mmob*PSI)/(1+model->SOI3theta*vGBF));              DS_Dvgfb = (Mmob/D)*DPSI_Dvgfb -                         (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF)))                                   *(1-Dpsi_st0_Dvgfb);              DS_Dvsb = (Mmob/D)*DPSI_Dvsb -                        (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF)))                                   *((-sigma)-Dpsi_st0_Dvsb);              DS_Dvdb = (Mmob/D)*DPSI_Dvdb -                        (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF)))                                   *((sigma)-Dpsi_st0_Dvdb);              DS_DdeltaT = (Mmob/D)*DPSI_DdeltaT -                           (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF)))                                      *((-model->SOI3chiFB)-Dpsi_st0_DdeltaT) -                                (PSI/D)*theta2*(model->SOI3k/(deltaT+here->SOI3temp) -                                                  TVF/(600*(1+TVF)));              Dpsi_sLsat_Dvgfb = Dpsi_st0_Dvgfb +                                 DPSI_Dvgfb/S -                                 PSI*DS_Dvgfb/(S*S);              Dpsi_sLsat_Dvsb  = Dpsi_st0_Dvsb +                                 DPSI_Dvsb/S -                                 PSI*DS_Dvsb/(S*S);              Dpsi_sLsat_Dvdb  = Dpsi_st0_Dvdb +                                 DPSI_Dvdb/S -                                 PSI*DS_Dvdb/(S*S);              Dpsi_sLsat_DdeltaT  = Dpsi_st0_DdeltaT +                                    DPSI_DdeltaT/S -                                    PSI*DS_DdeltaT/(S*S);            } else {              Dpsi_sLsat_Dvgfb = Dpsi_st0_Dvgfb;              Dpsi_sLsat_Dvsb  = Dpsi_st0_Dvsb;              Dpsi_sLsat_Dvdb  = Dpsi_st0_Dvdb;              Dpsi_sLsat_DdeltaT  = Dpsi_st0_DdeltaT;            }            if (Esd0_trans) {              if (psi_s0_trans) {                tmp  = (Esi0/(1+Esd0+Esi0))/(1+Esd0);                tmp1 = (Esi0/(1+Esd0+Esi0))*(Esd0/(1+Esd0));              } else {                tmp  = 1/(1+Esd0);                tmp1 = Esd0*tmp;              }              Dpsi_s0_Dvgfb = tmp*Dpsi_si0_Dvgfb + tmp1*Dpsi_sLsat_Dvgfb;              Dpsi_s0_Dvdb = tmp*Dpsi_si0_Dvdb + tmp1*Dpsi_sLsat_Dvdb;              Dpsi_s0_Dvsb = tmp*Dpsi_si0_Dvsb + tmp1*Dpsi_sLsat_Dvsb;              Dpsi_s0_DdeltaT = tmp*Dpsi_si0_DdeltaT + tmp1*Dpsi_sLsat_DdeltaT;            } else {              Dpsi_s0_Dvgfb = Dpsi_sLsat_Dvgfb;              Dpsi_s0_Dvdb = Dpsi_sLsat_Dvdb;              Dpsi_s0_Dvsb = Dpsi_sLsat_Dvsb;              Dpsi_s0_DdeltaT = Dpsi_sLsat_DdeltaT;            }            if (EsdL_trans) {              if (psi_sL_trans) {                tmp  = (EsiL/(1+EsdL+EsiL))/(1+EsdL);                tmp1 = (EsiL/(1+EsdL+EsiL))*(EsdL/(1+EsdL));              } else {                tmp  = 1/(1+EsdL);                tmp1 = EsdL*tmp;              }              Dpsi_sL_Dvgfb = tmp*Dpsi_siL_Dvgfb + tmp1*Dpsi_sLsat_Dvgfb;              Dpsi_sL_Dvdb = tmp*Dpsi_siL_Dvdb + tmp1*Dpsi_sLsat_Dvdb;              Dpsi_sL_Dvsb = tmp*Dpsi_siL_Dvsb + tmp1*Dpsi_sLsat_Dvsb;              Dpsi_sL_DdeltaT = tmp*Dpsi_siL_DdeltaT + tmp1*Dpsi_sLsat_DdeltaT;            } else {              Dpsi_sL_Dvgfb = Dpsi_sLsat_Dvgfb;              Dpsi_sL_Dvdb = Dpsi_sLsat_Dvdb;              Dpsi_sL_Dvsb = Dpsi_sLsat_Dvsb;              Dpsi_sL_DdeltaT = Dpsi_sLsat_DdeltaT;            }/* now for the whole kaboodle */            DfL_Dvgfb = psi_sL*(DvGT_Dvgfb + vt*Dalpha_Dvgfb) -                        psi_sL*psi_sL*0.5*Dalpha_Dvgfb +                        (vGBT - alpha*psi_sL)*Dpsi_sL_Dvgfb;            Df0_Dvgfb = psi_s0*(DvGT_Dvgfb + vt*Dalpha_Dvgfb) -                        psi_s0*psi_s0*0.5*Dalpha_Dvgfb +                        (vGBT - alpha*psi_s0)*Dpsi_s0_Dvgfb;            DfL_Dvdb  = psi_sL*(DvGT_Dvdb + vt*Dalpha_Dvdb) -                        psi_sL*psi_sL*0.5*Dalpha_Dvdb +                        (vGBT - alpha*psi_sL)*Dpsi_sL_Dvdb;            Df0_Dvdb  = psi_s0*(DvGT_Dvdb + vt*Dalpha_Dvdb) -                        psi_s0*psi_s0*0.5*Dalpha_Dvdb +                        (vGBT - alpha*psi_s0)*Dpsi_s0_Dvdb;            DfL_Dvsb  = psi_sL*(DvGT_Dvsb + vt*Dalpha_Dvsb) -                        psi_sL*psi_sL*0.5*Dalpha_Dvsb +                        (vGBT - alpha*psi_sL)*Dpsi_sL_Dvsb;            Df0_Dvsb  = psi_s0*(DvGT_Dvsb + vt*Dalpha_Dvsb) -                        psi_s0*psi_s0*0.5*Dalpha_Dvsb +                        (vGBT - alpha*psi_s0)*Dpsi_s0_Dvsb;                        DfL_DdeltaT = psi_sL*(DvGT_DdeltaT + vt*Dalpha_DdeltaT) -                          psi_sL*psi_sL*0.5*Dalpha_DdeltaT +                          (vGBT - alpha*psi_sL)*Dpsi_sL_DdeltaT;            Df0_DdeltaT = psi_s0*(DvGT_DdeltaT + vt*Dalpha_DdeltaT) -                          psi_s0*psi_s0*0.5*Dalpha_DdeltaT +                          (vGBT - alpha*psi_s0)*Dpsi_s0_DdeltaT;/* put them all together and what have you got ...? */            gmg = Beta*(DfL_Dvgfb - Df0_Dvgfb);                             gmd = Beta*(DfL_Dvdb - Df0_Dvdb);                             gms = Beta*(DfL_Dvsb - Df0_Dvsb);            gmt = Beta*(DfL_DdeltaT - Df0_DdeltaT);/* End Intrinsic Electrical Bit *//*  * High Field Mobility Effects */                Fm = 1 + model->SOI3theta*(vg - 0.5*(psi_sL + psi_s0)) +                     theta2 * (psi_sL - psi_s0);                ich0 = ich0/Fm;                here->SOI3ueff = here->SOI3ueff/Fm;                gmg = (gmg-ich0*(model->SOI3theta*                                  (1-0.5*(Dpsi_sL_Dvgfb + Dpsi_s0_Dvgfb)) +                                   theta2*(Dpsi_sL_Dvgfb - Dpsi_s0_Dvgfb)                                )                      )/Fm;                gmd = (gmd-ich0*(model->SOI3theta*                                  (sigma-0.5*(Dpsi_sL_Dvdb + Dpsi_s0_Dvdb)) +                                   theta2*(Dpsi_sL_Dvdb - Dpsi_s0_Dvdb)                                )                      )/Fm;                gms = (gms-ich0*(model->SOI3theta*                                  (-sigma-0.5*(Dpsi_sL_Dvsb + Dpsi_s0_Dvsb)) +                                  theta2*(Dpsi_sL_Dvsb - Dpsi_s0_Dvsb)                                )                      )/Fm;                gmt = (gmt-ich0*(model->SOI3theta*                                 ((-model->SOI3chiFB)-0.5*(Dpsi_sL_DdeltaT + Dpsi_s0_DdeltaT)                                 ) +                                   theta2*(Dpsi_sL_DdeltaT - Dpsi_s0_DdeltaT -                                               (psi_sL - psi_s0)*(model->SOI3k/(deltaT+here->SOI3temp) -                                                                  TVF/(600*(1+TVF))                                                                 )                                         )                                )                      )/Fm;/*  * End High Field Mobility Effects *//* Now to define bits which affect the drain region *//* * Channel Length Modulation */						/* JimB - add thermal voltage to vdsat to ensure it remains above zero in subthreshold */ 						vdsat = psi_sLsat - psi_st0 + vt;            		Dvdsat_Dvgfb = Dpsi_sLsat_Dvgfb - Dpsi_st0_Dvgfb;            		Dvdsat_Dvsb = Dpsi_sLsat_Dvsb - Dpsi_st0_Dvsb;            		Dvdsat_Dvdb = Dpsi_sLsat_Dvdb - Dpsi_st0_Dvdb;            		Dvdsat_DdeltaT = Dpsi_sLsat_DdeltaT - Dpsi_st0_DdeltaT;   					m = model->SOI3mexp;   					if (m>0)                  {                     if (vdsat>0)                     {   					      vds2m = 1;   					      vdsat2m = 1;   					      for (i=0; i<2*m; i=i+1)                        {   					         vds2m = vds2m*(vds*here->SOI3mode);   						      vdsat2m = vdsat2m*vdsat;                        }   					      Em = exp(-log(vds2m+vdsat2m)/(2*m));   					      vdslim = (here->SOI3mode*vds)*vdsat*Em;      				      Dvdslim_Dvgfb = (here->SOI3mode*vds*Em*Dvdsat_Dvgfb*vds2m)/(vds2m+

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -