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

📄 soi3temp.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
📖 第 1 页 / 共 2 页
字号:
            double czbd;    /* zero voltage bulk-drain capacitance */            double czbs;    /* zero voltage bulk-source capacitance */            double cj0;     /* default value of zero voltage bulk-source/drain capacitance*/            double Nratio;  /* ratio of Nsub*Nplus/Nsub+Nplus */            double arg;     /* 1 - fc */            double sarg;    /* (1-fc) ^^ (-mj) */            	    if (here->SOI3owner != ARCHme)                    continue;            /* perform the parameter defaulting */            	    /* JimB - if device temperature not given, OR, if self-heating switched */            /* on, then set device temperature equal to circuit temperature.  Can't */            /* set device temp with self-heating on, otherwise get multiple thermal */            /* ground nodes, but doesn't matter, since any sizeable thermal gradient*/            /* across an IC circuit is probably due to self-heating anyway.         */            if ( (!here->SOI3tempGiven) || (here->SOI3rt != 0) )            {               here->SOI3temp = ckt->CKTtemp;            }            vt = here->SOI3temp * CONSTKoverQ;            ratio = here->SOI3temp/model->SOI3tnom;            fact2 = here->SOI3temp/REFTEMP;            kt = here->SOI3temp * CONSTboltz;            egfet = 1.16-(7.02e-4*here->SOI3temp*here->SOI3temp)/                    (here->SOI3temp+1108);            if (!model->SOI3chidGiven)            {               model->SOI3chid = CHARGE*egfet/CONSTboltz;            }            if (!model->SOI3chid1Given)            {               model->SOI3chid1 = CHARGE*egfet/CONSTboltz;            }            arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP));            pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg);            if(!here->SOI3lGiven)            {               here->SOI3l = ckt->CKTdefaultMosL;            }            if(!here->SOI3wGiven)            {               here->SOI3w = ckt->CKTdefaultMosW;            }            if(here->SOI3l - 2 * model->SOI3latDiff <=0)            {					(*(SPfrontEnd->IFerror))(ERR_WARNING,               	"%s: Effective channel length less than zero \nIncreasing \                  this instance length by 2*LD to remove effect of LD",                  &(here->SOI3name));					here->SOI3l += 2*model->SOI3latDiff;            }            ratio4 =  exp(model->SOI3k*log(ratio)); /* ratio4 = (temp/tnom)^k */                                                    /* i.e. mobilitites prop to */                                                    /* T^-(k) where k=1.5 for old SPICE */            here->SOI3tTransconductance = model->SOI3transconductance / ratio4;            here->SOI3tSurfMob = model->SOI3surfaceMobility/ratio4;            phio= (model->SOI3phi-pbfact1)/fact1; /* this is PHI @ REFTEMP */            here->SOI3tPhi = fact2 * phio + pbfact;            here->SOI3tVfbF = model->SOI3vfbF +                  (model->SOI3type * model->SOI3gateType * 0.5*(egfet1-egfet)) +                 (model->SOI3type * 0.5 * (model->SOI3phi - here->SOI3tPhi));            here->SOI3tVfbB =  model->SOI3vfbB +                                (1-model->SOI3type)*0.5*(here->SOI3tPhi-model->SOI3phi);            here->SOI3tVto = here->SOI3tVfbF + model->SOI3type *                    (model->SOI3gamma * sqrt(here->SOI3tPhi) + eta_s*here->SOI3tPhi);            here->SOI3tSatCur = model->SOI3jctSatCur*                    exp(-egfet/vt+egfet1/vtnom);            here->SOI3tSatCur1 = model->SOI3jctSatCur1*                    exp(-egfet/vt+egfet1/vtnom);            here->SOI3tSatCurDens = model->SOI3jctSatCurDensity *                    exp(-egfet/vt+egfet1/vtnom);            here->SOI3tSatCurDens1 = model->SOI3jctSatCurDensity1 *                    exp(-egfet/vt+egfet1/vtnom);            pbo = (model->SOI3bulkJctPotential - pbfact1)/fact1;            gmaold = (model->SOI3bulkJctPotential-pbo)/pbo;            capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff*                    (4e-4*(model->SOI3tnom-REFTEMP)-gmaold));            here->SOI3tCbd = model->SOI3capBD * capfact;            here->SOI3tCbs = model->SOI3capBS * capfact;            here->SOI3tCjsw = model->SOI3sideWallCapFactor * capfact;            here->SOI3tBulkPot = fact2 * pbo+pbfact;            gmanew = (here->SOI3tBulkPot-pbo)/pbo;            capfact = (1+model->SOI3bulkJctSideGradingCoeff*                    (4e-4*(here->SOI3temp-REFTEMP)-gmanew));            here->SOI3tCbd *= capfact;            here->SOI3tCbs *= capfact;            here->SOI3tCjsw *= capfact;            here->SOI3tDepCap = model->SOI3fwdCapDepCoeff * here->SOI3tBulkPot;            if (here->SOI3tSatCurDens == 0)            {               if (here->SOI3tSatCur == 0)               {                  here->SOI3sourceVcrit = here->SOI3drainVcrit =                          vt*log(vt/(CONSTroot2*1.0e-15));               }               else               {                  here->SOI3sourceVcrit = here->SOI3drainVcrit =                          vt*log(vt/(CONSTroot2*here->SOI3tSatCur));               }            }            else            {               here->SOI3drainVcrit =                        vt * log( vt / (CONSTroot2 *                        here->SOI3tSatCurDens * (here->SOI3w)));               here->SOI3sourceVcrit =                        vt * log( vt / (CONSTroot2 *                        here->SOI3tSatCurDens * (here->SOI3w)));            }            if(model->SOI3capBDGiven)            {               czbd = here->SOI3tCbd;            }            else            {               if(model->SOI3sideWallCapFactorGiven)               {                  czbd = here->SOI3tCjsw * (here->SOI3w*model->SOI3bodyThickness);               }               /* JimB - 2/1/99.  Calculate default value for Cj0 */               /* using PN junction theory. */               else               {                  Nratio = (1e6*model->SOI3nplusDoping * model->SOI3substrateDoping)/                           (model->SOI3nplusDoping + model->SOI3substrateDoping);                  cj0 = sqrt((Nratio * 11.7 * 8.854214871e-12 * CHARGE)/                             (2 * here->SOI3tBulkPot));                  /* JimB - temperature dependence code */            		gmaold = (model->SOI3bulkJctPotential-pbo)/pbo;            		capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff*                    		(4e-4*(model->SOI3tnom-REFTEMP)-gmaold));                  cj0 *= capfact;            		gmanew = (here->SOI3tBulkPot-pbo)/pbo;            		capfact = (1+model->SOI3bulkJctSideGradingCoeff*                    		(4e-4*(here->SOI3temp-REFTEMP)-gmanew));            		cj0 *= capfact;                  czbd = cj0 * (here->SOI3w*model->SOI3bodyThickness);               }            }            arg = 1-model->SOI3fwdCapDepCoeff;            sarg = exp( (-model->SOI3bulkJctSideGradingCoeff) * log(arg) );            here->SOI3Cbd = czbd;            here->SOI3f2d = czbd*(1-model->SOI3fwdCapDepCoeff*                        (1+model->SOI3bulkJctSideGradingCoeff))*                        sarg/arg;            here->SOI3f3d = czbd * model->SOI3bulkJctSideGradingCoeff * sarg/arg /                        here->SOI3tBulkPot;            here->SOI3f4d = czbd*here->SOI3tBulkPot*(1-arg*sarg)/                        (1-model->SOI3bulkJctSideGradingCoeff)                    -here->SOI3f3d/2*                        (here->SOI3tDepCap*here->SOI3tDepCap)                    -here->SOI3tDepCap * here->SOI3f2d;            if(model->SOI3capBSGiven)            {               czbs=here->SOI3tCbs;            }            else            {               if(model->SOI3sideWallCapFactorGiven)               {                  czbs=here->SOI3tCjsw * (here->SOI3w*model->SOI3bodyThickness);               }               /* JimB - 2/1/99.  Calculate default value for Cj0 */               /* using PN junction theory. */               else               {                  Nratio = (1e6*model->SOI3nplusDoping * model->SOI3substrateDoping)/                           (model->SOI3nplusDoping + model->SOI3substrateDoping);                  cj0 = sqrt((Nratio * 11.7 * 8.854214871e-12 * CHARGE)/                             (2 * here->SOI3tBulkPot));                  /* JimB - temperature dependence code */            		gmaold = (model->SOI3bulkJctPotential-pbo)/pbo;            		capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff*                    		(4e-4*(model->SOI3tnom-REFTEMP)-gmaold));                  cj0 *= capfact;            		gmanew = (here->SOI3tBulkPot-pbo)/pbo;            		capfact = (1+model->SOI3bulkJctSideGradingCoeff*                    		(4e-4*(here->SOI3temp-REFTEMP)-gmanew));            		cj0 *= capfact;                  czbs = cj0 * (here->SOI3w*model->SOI3bodyThickness);               }            }            arg = 1-model->SOI3fwdCapDepCoeff;            sarg = exp( (-model->SOI3bulkJctSideGradingCoeff) * log(arg) );            here->SOI3Cbs = czbs;            here->SOI3f2s = czbs*(1-model->SOI3fwdCapDepCoeff*                        (1+model->SOI3bulkJctSideGradingCoeff))*                        sarg/arg;            here->SOI3f3s = czbs * model->SOI3bulkJctSideGradingCoeff * sarg/arg /                        here->SOI3tBulkPot;            here->SOI3f4s = czbs*here->SOI3tBulkPot*(1-arg*sarg)/                        (1-model->SOI3bulkJctSideGradingCoeff)                    -here->SOI3f3s/2*                        (here->SOI3tDepCap*here->SOI3tDepCap)                    -here->SOI3tDepCap * here->SOI3f2s;            if(model->SOI3drainResistanceGiven)            {               if(model->SOI3drainResistance != 0)               {                  here->SOI3drainConductance = 1/model->SOI3drainResistance;               }               else               {                  here->SOI3drainConductance = 0;               }            }            else if (model->SOI3sheetResistanceGiven)            {               if(model->SOI3sheetResistance != 0)               {                  here->SOI3drainConductance =                        1/(model->SOI3sheetResistance*here->SOI3drainSquares);               }               else               {                  here->SOI3drainConductance = 0;               }            }            else if(model->SOI3rdwGiven)            {               if (model->SOI3rdw != 0)               {                	/* JimB - 1e6 multiplying factor converts W from m to microns */                  here->SOI3drainConductance =                    (here->SOI3w/model->SOI3rdw)*1e6;               }               else               {                  here->SOI3drainConductance = 0;               }            }            else            {                here->SOI3drainConductance = 0;            }                        if(model->SOI3sourceResistanceGiven)            {               if(model->SOI3sourceResistance != 0)               {                  here->SOI3sourceConductance = 1/model->SOI3sourceResistance;               }               else               {                  here->SOI3sourceConductance = 0;               }            }            else if (model->SOI3sheetResistanceGiven)            {               if(model->SOI3sheetResistance != 0)               {                  here->SOI3sourceConductance =                        1/(model->SOI3sheetResistance*here->SOI3sourceSquares);               }               else               {                  here->SOI3sourceConductance = 0;               }            }            else if(model->SOI3rswGiven)            {               if (model->SOI3rsw != 0)               {                	/* JimB - 1e6 multiplying factor converts W from m to microns */                  here->SOI3sourceConductance =                    (here->SOI3w/model->SOI3rsw)*1e6;               }               else               {                  here->SOI3sourceConductance = 0;               }            }            else            {               here->SOI3sourceConductance = 0;            }/* extra stuff for newer model - msll Jan96 */        } /* finish looping through all instances of the model*/    } /* finish looping through all the transistor models */    return(OK);}

⌨️ 快捷键说明

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