46 #include <Xyce_config.h>
61 #include <N_ERH_ErrorMgr.h>
65 #include <N_LAS_Matrix.h>
66 #include <N_LAS_Vector.h>
67 #include <N_UTL_FeatureTest.h>
68 #include <N_UTL_Math.h>
82 .setDescription(
"Device temperature"),
85 .setOriginalValueStored(
true)
88 .setDescription(
"Channel length");
91 .setOriginalValueStored(
true)
94 .setDescription(
"Channel width");
99 .setDescription(
"Drain diffusion area");
104 .setDescription(
"Source diffusion area");
109 .setDescription(
"Multiplier for RSH to yield parasitic resistance of drain");
114 .setDescription(
"Multiplier for RSH to yield parasitic resistance of source");
119 .setDescription(
"Drain diffusion perimeter");
124 .setDescription(
"Source diffusion perimeter");
129 .setDescription(
"Multiplier for M devices connected in parallel");
136 .setDescription(
"Initial condition on Drain-Source voltage");
142 .setDescription(
"Initial condition on Gate-Source voltage");
148 .setDescription(
"Initial condition on Bulk-Source voltage");
156 .setDescription(
"Initial condition of no voltage drops across device");
165 .setDescription(
"Default channel length");
170 .setDescription(
"Default channel width");
175 .setDescription(
"Zero-bias threshold voltage");
180 .setDescription(
"Transconductance coefficient");
185 .setDescription(
"Bulk threshold parameter");
190 .setDescription(
"Surface potential");
196 .setDescription(
"Drain ohmic resistance");
202 .setDescription(
"Source ohmic resistance");
209 .setDescription(
"Zero-bias bulk-drain p-n capacitance");
216 .setDescription(
"Zero-bias bulk-source p-n capacitance");
221 .setDescription(
"Bulk p-n saturation current");
226 .setDescription(
"Bulk p-n bottom potential");
231 .setDescription(
"Gate-source overlap capacitance/channel width");
236 .setDescription(
"Gate-drain overlap capacitance/channel width");
241 .setDescription(
"Gate-bulk overlap capacitance/channel length");
246 .setDescription(
"Drain,source diffusion sheet resistance");
252 .setDescription(
"Bulk p-n zero-bias bottom capacitance/area");
257 .setDescription(
"Bulk p-n bottom grading coefficient");
263 .setDescription(
"Bulk p-n zero-bias sidewall capacitance/area");
268 .setDescription(
"Bulk p-n sidewall grading coefficient");
273 .setDescription(
"Bulk p-n saturation current density");
276 .setOriginalValueStored(
true)
279 .setDescription(
"Gate oxide thickness");
284 .setDescription(
"Lateral diffusion length");
289 .setDescription(
"Surface mobility");
294 .setDescription(
"Surface mobility");
299 .setDescription(
"Bulk p-n forward-bias capacitance coefficient");
304 .setDescription(
"Substrate doping density");
309 .setDescription(
"Surface state density");
314 .setDescription(
"Static feedback");
319 .setDescription(
"Width effect on threshold");
324 .setDescription(
"Fast surface state density");
329 .setDescription(
"Mobility modulation");
334 .setDescription(
"Maximum drift velocity");
339 .setDescription(
"Saturation field factor");
344 .setDescription(
"Metallurgical junction depth");
349 .setDescription(
"Parameter measurement temperature");
354 .setDescription(
"Flicker noise coefficient");
359 .setDescription(
"Flicker noise exponent");
365 .setDescription(
"Gate material type (-1 = same as substrate,0 = aluminum,1 = opposite of substrate)");
416 :
DeviceInstance(IB, configuration.getInstanceParameters(), factory_block),
424 l(getDeviceOptions().defl),
425 w(getDeviceOptions().defw),
427 drainArea(getDeviceOptions().defad),
428 sourceArea(getDeviceOptions().defas),
432 sourcePerimeter(0.0),
433 sourceConductance(0.0),
434 drainConductance(0.0),
435 temp(getDeviceOptions().temp.getImmutableValue<double>()),
437 tTransconductance(0.0),
488 GateSourceOverlapCap(0),
489 GateDrainOverlapCap(0),
490 GateBulkOverlapCap(0),
502 ADrainEquDrainNodeOffset(-1),
503 ADrainEquDrainPrimeNodeOffset(-1),
505 AGateEquGateNodeOffset(-1),
506 AGateEquBulkNodeOffset(-1),
507 AGateEquDrainPrimeNodeOffset(-1),
508 AGateEquSourcePrimeNodeOffset(-1),
510 ASourceEquSourceNodeOffset(-1),
511 ASourceEquSourcePrimeNodeOffset(-1),
513 ABulkEquGateNodeOffset(-1),
514 ABulkEquBulkNodeOffset(-1),
515 ABulkEquDrainPrimeNodeOffset(-1),
516 ABulkEquSourcePrimeNodeOffset(-1),
518 ADrainPrimeEquDrainNodeOffset(-1),
519 ADrainPrimeEquGateNodeOffset(-1),
520 ADrainPrimeEquBulkNodeOffset(-1),
521 ADrainPrimeEquDrainPrimeNodeOffset(-1),
522 ADrainPrimeEquSourcePrimeNodeOffset(-1),
524 ASourcePrimeEquGateNodeOffset(-1),
525 ASourcePrimeEquSourceNodeOffset(-1),
526 ASourcePrimeEquBulkNodeOffset(-1),
527 ASourcePrimeEquDrainPrimeNodeOffset(-1),
528 ASourcePrimeEquSourcePrimeNodeOffset(-1),
533 f_DrainEquDrainNodePtr(0),
534 f_DrainEquDrainPrimeNodePtr(0),
536 f_GateEquGateNodePtr(0),
537 f_GateEquBulkNodePtr(0),
538 f_GateEquDrainPrimeNodePtr(0),
539 f_GateEquSourcePrimeNodePtr(0),
541 f_SourceEquSourceNodePtr(0),
542 f_SourceEquSourcePrimeNodePtr(0),
544 f_BulkEquGateNodePtr(0),
545 f_BulkEquBulkNodePtr(0),
546 f_BulkEquDrainPrimeNodePtr(0),
547 f_BulkEquSourcePrimeNodePtr(0),
549 f_DrainPrimeEquDrainNodePtr(0),
550 f_DrainPrimeEquGateNodePtr(0),
551 f_DrainPrimeEquBulkNodePtr(0),
552 f_DrainPrimeEquDrainPrimeNodePtr(0),
553 f_DrainPrimeEquSourcePrimeNodePtr(0),
555 f_SourcePrimeEquGateNodePtr(0),
556 f_SourcePrimeEquSourceNodePtr(0),
557 f_SourcePrimeEquBulkNodePtr(0),
558 f_SourcePrimeEquDrainPrimeNodePtr(0),
559 f_SourcePrimeEquSourcePrimeNodePtr(0),
562 q_DrainEquDrainNodePtr(0),
563 q_DrainEquDrainPrimeNodePtr(0),
565 q_GateEquGateNodePtr(0),
566 q_GateEquBulkNodePtr(0),
567 q_GateEquDrainPrimeNodePtr(0),
568 q_GateEquSourcePrimeNodePtr(0),
570 q_SourceEquSourceNodePtr(0),
571 q_SourceEquSourcePrimeNodePtr(0),
573 q_BulkEquGateNodePtr(0),
574 q_BulkEquBulkNodePtr(0),
575 q_BulkEquDrainPrimeNodePtr(0),
576 q_BulkEquSourcePrimeNodePtr(0),
578 q_DrainPrimeEquDrainNodePtr(0),
579 q_DrainPrimeEquGateNodePtr(0),
580 q_DrainPrimeEquBulkNodePtr(0),
581 q_DrainPrimeEquDrainPrimeNodePtr(0),
582 q_DrainPrimeEquSourcePrimeNodePtr(0),
584 q_SourcePrimeEquGateNodePtr(0),
585 q_SourcePrimeEquSourceNodePtr(0),
586 q_SourcePrimeEquBulkNodePtr(0),
587 q_SourcePrimeEquDrainPrimeNodePtr(0),
588 q_SourcePrimeEquSourcePrimeNodePtr(0),
766 UserError0(*
this) <<
"Effective channel length less than zero.";
799 const std::vector<int> & extLIDVecRef )
806 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
808 Xyce::dout() << section_divider << std::endl;
809 Xyce::dout() <<
" In Instance::register LIDs\n\n";
810 Xyce::dout() <<
" name = " <<
getName() << std::endl;
811 Xyce::dout() <<
" number of internal variables: " <<
numIntVars << std::endl;
812 Xyce::dout() <<
" number of external variables: " <<
numExtVars << std::endl;
840 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
842 Xyce::dout() <<
"\n variable local indices:\n";
843 Xyce::dout() <<
" li_Drain = " <<
li_Drain << std::endl;
844 Xyce::dout() <<
" li_DrainPrime = " <<
li_DrainPrime << std::endl;
845 Xyce::dout() <<
" li_Source = " <<
li_Source << std::endl;
846 Xyce::dout() <<
" li_SourcePrime = " <<
li_SourcePrime << std::endl;
847 Xyce::dout() <<
" li_Gate = " <<
li_Gate << std::endl;
848 Xyce::dout() <<
" li_Bulk = " <<
li_Bulk << std::endl;
850 Xyce::dout() << section_divider << std::endl;
892 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
894 Xyce::dout() << std::endl;
895 Xyce::dout() << section_divider << std::endl;
896 Xyce::dout() <<
" In Instance::registerStateLIDs\n\n";
897 Xyce::dout() <<
" name = " <<
getName() << std::endl;
898 Xyce::dout() <<
" Number of State LIDs: " <<
numStateVars << std::endl;
918 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
920 Xyce::dout() <<
" State local indices:" << std::endl;
921 Xyce::dout() << std::endl;
930 Xyce::dout() << std::endl;
931 Xyce::dout() << section_divider << std::endl;
997 std::vector<int> map;
998 std::vector< std::vector<int> > map2;
1065 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
1152 double Qeqbs(0.0),Qeqbd(0.0),Qeqgb(0.0), Qeqgs(0.0), Qeqgd(0.0);
1161 Qeqbs = Dtype*(
qbs);
1162 Qeqbd = Dtype*(
qbd);
1165 Qeqgb = Dtype*(
qgb);
1166 Qeqgs = Dtype*(
qgs);
1167 Qeqgd = Dtype*(
qgd);
1170 coef = (Qeqgs+Qeqgd+Qeqgb);
1174 coef = Qeqbs + Qeqbd - Qeqgb;
1178 coef = -(Qeqbd + Qeqgd);
1182 coef = -(Qeqbs + Qeqgs);
1204 double gcgd, gcgs, gcgb, gcbs, gcbd;
1216 gcgd = 0.0; gcgs = 0.0; gcgb = 0.0; gcbs = 0.0; gcbd = 0.0;
1224 double coef_Jdxp4 = Dtype*(
1230 double coef_Jdxp5 = Dtype*(
1263 double ceqbs(0.0),ceqbd(0.0),ceqgb(0.0), ceqgs(0.0), ceqgd(0.0);
1270 ceqbs = Dtype*(
cbs);
1271 ceqbd = Dtype*(
cbd);
1286 coef = (ceqgs+ceqgd+ceqgb);
1297 coef = ceqbs + ceqbd - ceqgb;
1317 double coef_Jdxp4 = Dtype*(
1322 double coef_Jdxp5 = Dtype*(
1329 double coef_Jdxp6 = Dtype*(
1413 +(gcbd+gcgd)*numberParallel;
1420 +(gcbs+gcgs)*numberParallel;
1452 (
gbs+
gbd)*numberParallel;
1491 bool bsuccess =
true;
1593 if ((*flagSolVectorPtr)[
li_Drain] == 0 || (*flagSolVectorPtr)[
li_Gate] == 0 ||
1777 double coeff0 = 0.0631353e0;
1778 double coeff1 = 0.8013292e0;
1779 double coeff2 = -0.01110777e0;
1877 Xyce::dout() <<
"HOMOTOPY INFO: gainscale = "
1879 Xyce::dout() <<
"HOMOTOPY INFO: before vds = " << vds << std::endl;
1880 Xyce::dout() <<
"HOMOTOPY INFO: before vgs = " <<
vgs << std::endl;
1920 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1922 Xyce::dout() <<
"HOMOTOPY INFO: after vds = " << vds << std::endl;
1923 Xyce::dout() <<
"HOMOTOPY INFO: after vgs = " <<
vgs << std::endl;
1944 if ( (
mode==1?vbs:
vbd) <= 0.0 )
1947 sqphis = sqrt(
tPhi);
1950 sqphs3 =
tPhi*sqphis;
1952 sqphbs = sqrt(phibs);
1953 dsqdvb = -0.5/sqphbs;
1957 sqphis = sqrt(
tPhi);
1958 sqphs3 =
tPhi*sqphis;
1959 sqphbs = sqphis/(1.0+(
mode==1?vbs:
vbd)/
1961 phibs = sqphbs*sqphbs;
1962 dsqdvb = -phibs/(sqphs3+sqphs3);
1974 wponxj = wps*oneoverxj;
1975 wconxj = coeff0+coeff1*wponxj+coeff2*wponxj*wponxj;
1976 arga = wconxj+djonxj;
1977 argc = wponxj/(1.0+wponxj);
1978 argb = sqrt(1.0-argc*argc);
1979 fshort = 1.0-xjonxl*(arga*argb-djonxj);
1981 dadvb = (coeff1+coeff2*(wponxj+wponxj))*dwpdvb*oneoverxj;
1982 dbdvb = -argc*argc*(1.0-argc)*dwpdvb/(argb*wps);
1983 dfsdvb = -xjonxl*(dadvb*argb+arga*dbdvb);
1994 fbodys = 0.5*gammas/(sqphbs+sqphbs);
1997 onfbdy = 1.0/(1.0+fbody);
1998 dfbdvb = -fbodys*dsqdvb/sqphbs+fbodys*dfsdvb/fshort;
2000 dqbdvb = gammas*dsqdvb+
model_.
gamma*dfsdvb*sqphbs-
2021 cdonco = qbonco/(phibs+phibs);
2022 xn = 1.0+csonco+cdonco;
2024 dxndvb = dqbdvb/(phibs+phibs)-qbonco*dsqdvb/(phibs*sqphbs);
2026 dvodvb = dvtdvb+
vt*dxndvb;
2055 dfgdvd = -dfgdvg*dvtdvd;
2056 dfgdvb = -dfgdvg*dvtdvb;
2061 Vdsat = (vgsx-vth)*onfbdy;
2066 dvsdvd = -dvsdvg*dvtdvd;
2067 dvsdvb = -dvsdvg*dvtdvb-Vdsat*dfbdvb*onfbdy;
2073 arga = (vgsx-vth)*onfbdy;
2074 argb = sqrt(arga*arga+vdsc*vdsc);
2075 Vdsat = arga+vdsc-argb;
2076 dvsdga = (1.0-arga/argb)*onfbdy;
2077 dvsdvg = dvsdga-(1.0-vdsc/argb)*vdsc*dfgdvg*onfg;
2078 dvsdvd = -dvsdvg*dvtdvd;
2079 dvsdvb = -dvsdvg*dvtdvb-arga*dvsdga*dfbdvb;
2084 vdsx = std::min((
mode*vds),Vdsat);
2085 if ( vdsx == 0.0 )
goto line900;
2087 cdo = vgsx-vth-0.5*(1.0+fbody)*vdsx;
2088 dcodvb = -dvtdvb-0.5*dfbdvb*vdsx;
2096 gds = vgsx-vth-(1.0+fbody+dvtdvd)*vdsx;
2104 gm = Beta*
gm+dfgdvg*cd1;
2105 gds = Beta*
gds+dfgdvd*cd1;
2113 fdrain = 1.0/(1.0+vdsx*onvdsc);
2114 fd2 = fdrain*fdrain;
2115 arga = fd2*vdsx*onvdsc*onfg;
2116 dfddvg = -dfgdvg*arga;
2117 dfddvd = -dfgdvd*arga-fd2*onvdsc;
2118 dfddvb = -dfgdvb*arga;
2124 gmbs = fdrain*gmbs+dfddvb*
cdrain;
2132 if ( (
mode*vds) <= Vdsat )
goto line700;
2136 gdsat = cdsat*(1.0-fdrain)*onvdsc;
2137 gdsat = std::max(1.0e-12,gdsat);
2138 gdoncd = gdsat/cdsat;
2139 gdonfd = gdsat/(1.0-fdrain);
2140 gdonfg = gdsat*onfg;
2141 dgdvg = gdoncd*
gm-gdonfd*dfddvg+gdonfg*dfgdvg;
2142 dgdvd = gdoncd*
gds-gdonfd*dfddvd+gdonfg*dfgdvd;
2143 dgdvb = gdoncd*gmbs-gdonfd*dfddvb+gdonfg*dfgdvb;
2156 emoncd = emax/cdsat;
2157 emongd = emax/gdsat;
2158 demdvg = emoncd*
gm-emongd*dgdvg;
2159 demdvd = emoncd*
gds-emongd*dgdvd;
2160 demdvb = emoncd*gmbs-emongd*dgdvb;
2164 argb = sqrt(arga*arga+argc*((
mode*vds)-Vdsat));
2166 dldvd = argc/(argb+argb);
2168 ddldvg = dldem*demdvg;
2169 ddldvd = dldem*demdvd-dldvd;
2170 ddldvb = dldem*demdvb;
2175 dldvd = 0.5*delxl/((
mode*
vds)-Vdsat);
2189 ddldvg = ddldvg*arga;
2190 ddldvd = ddldvd*arga;
2191 ddldvb = ddldvb*arga;
2197 dlonxl = delxl*oneoverxl;
2198 xlfact = 1.0/(1.0-dlonxl);
2201 gm =
gm*xlfact+diddl*ddldvg;
2202 gds0 =
gds*xlfact+diddl*ddldvd;
2203 gmbs = gmbs*xlfact+diddl*ddldvb;
2204 gm =
gm+gds0*dvsdvg;
2205 gmbs = gmbs+gds0*dvsdvb;
2206 gds = gds0*dvsdvd+diddl*dldvd;
2212 if ( (
mode==1?
vgs:vgd) < Von )
2219 wfact = exp( ((
mode==1?
vgs:vgd)-Von)*ondvt );
2225 if ((
mode*vds) > Vdsat)
2227 gm =
gm+gds0*dvsdvg*wfact;
2229 gds =
gds*wfact+(gms-gmw)*dvodvd;
2230 gmbs = gmbs*wfact+(gms-gmw)*dvodvb-gmw*
2231 ((
mode==1?
vgs:vgd)-Von)*onxn*dxndvb;
2245 gds = Beta*(vgsx-vth);
2307 sarg = sargsw = 1/sqrt(arg);
2326 sargsw = 1/sqrt(arg);
2367 sarg = sargsw = 1/sqrt(arg);
2381 sargsw = 1/sqrt(arg);
2630 double ratio,ratio4;
2638 double gmanew,gmaold;
2643 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2645 Xyce::dout() << subsection_divider << std::endl;
2646 Xyce::dout() <<
" Instance::Begin of updateTemperature. \n";
2647 Xyce::dout() <<
" name = " <<
getName() << std::endl;
2648 Xyce::dout() << std::endl;
2652 if (temp_tmp != -999.0)
temp = temp_tmp;
2662 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2664 Xyce::dout() <<
"Temperature = "<<
temp << std::endl;
2665 Xyce::dout() <<
"tnom = " << tnom << std::endl;
2666 Xyce::dout() <<
"ratio = " << ratio << std::endl;
2675 pbfact = -2*
vt *(1.5*log(fact2)+
CONSTQ*arg);
2679 Xyce::dout() <<
"vt = " <<
vt << std::endl;
2680 Xyce::dout() <<
"ratio = " << ratio << std::endl;
2681 Xyce::dout() <<
"fact2 = " << fact2 << std::endl;
2682 Xyce::dout() <<
"kt = " << kt << std::endl;
2683 Xyce::dout() <<
"egfet = " << egfet << std::endl;
2684 Xyce::dout() <<
"arg = " << arg << std::endl;
2685 Xyce::dout() <<
"pbfact = " << pbfact << std::endl;
2697 ratio4 = ratio * sqrt(ratio);
2701 tPhi = fact2 * phio + pbfact;
2898 double vgs1, vgd1, vbs1,vgb1, vds1;
2992 noiseData.
resize(numSources);
3003 std::string(
"_1overf");
3048 (2.0/3.0 * fabs(
gm)),
temp);
3084 egfet1 = 1.16-(7.02e-4*tnom*
tnom)/(tnom+1108);
3115 wkfng = 3.25 + .5 *
egfet1 - fermig;
3117 wkfngs = wkfng - (3.25 + .5 *
egfet1 +fermis);
3162 std::vector<Instance*>::iterator iter;
3166 for (iter=first; iter!=last; ++iter)
3168 (*iter)->processParams();
3186 :
DeviceModel(MB, configuration.getModelParameters(), factory_block),
3188 tnom(getDeviceOptions().tnom),
3190 jctSatCurDensity(0.0),
3192 drainResistance(0.0),
3193 sourceResistance(0.0),
3194 sheetResistance(0.0),
3195 transconductance(0.0),
3196 gateSourceOverlapCapFactor(0.0),
3197 gateDrainOverlapCapFactor(0.0),
3198 gateBulkOverlapCapFactor(0.0),
3199 oxideCapFactor(0.0),
3204 sideWallCapFactor(0.0),
3205 bulkJctPotential(0.0),
3206 bulkJctBotGradingCoeff(0.0),
3207 bulkJctSideGradingCoeff(0.0),
3208 fwdCapDepCoeff(0.0),
3211 substrateDoping(0.0),
3213 surfaceStateDensity(0.0),
3214 oxideThickness(0.0),
3215 surfaceMobility(0.0),
3218 coeffDepLayWidth(0.0),
3221 fastSurfaceStateDensity(0.0),
3230 bulkCapFactorGiven(0),
3231 sideWallCapFactorGiven(0)
3238 else if (
getType() ==
"PMOS") {
3273 UserError0(*
this) <<
"Both uo and u0 have been specified and, which is not allowed";
3275 UserWarning0(*
this) <<
"Surface mobility has been specified as u0 instead of uo, uo is the preferred syntax";
3293 std::vector<Instance*>::iterator iter;
3297 for (iter=first; iter!=last; ++iter)
3314 std::vector<Instance*>::const_iterator iter;
3320 os <<
" name model name Parameters" << std::endl;
3321 for (i=0, iter=first; iter!=last; ++iter, ++i)
3323 os <<
" " << i <<
": " << (*iter)->getName() <<
"\t";
3348 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
3367 bool bsuccess =
true;
3377 double vgs1(0.0), vgd1(0.0), vbs1(0.0),vgb1(0.0), vds1(0.0);
3380 bsuccess = bsuccess && btmp;
3454 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV)
3463 double ceqbs(0.0),ceqbd(0.0),ceqgb(0.0), ceqgs(0.0), ceqgd(0.0);
3464 double Qeqbs(0.0),Qeqbd(0.0),Qeqgb(0.0), Qeqgs(0.0), Qeqgd(0.0);
3468 ceqbs = Dtype*(mi.
cbs);
3469 ceqbd = Dtype*(mi.
cbd);
3481 coef = (ceqgs+ceqgd+ceqgb);
3490 coef = ceqbs + ceqbd - ceqgb;
3503 Qeqbs = Dtype*(mi.
qbs);
3504 Qeqbd = Dtype*(mi.
qbd);
3507 Qeqgb = Dtype*(mi.
qgb);
3508 Qeqgs = Dtype*(mi.
qgs);
3509 Qeqgd = Dtype*(mi.
qgd);
3511 coef = (Qeqgs+Qeqgd+Qeqgb);
3515 coef = Qeqbs + Qeqbd - Qeqgb;
3519 coef = -(Qeqbd + Qeqgd);
3523 coef = -(Qeqbs + Qeqgs);
3531 double coef_Jdxp4 = Dtype*(
3535 double coef_Jdxp5 = Dtype*(
3541 double coef_Jdxp6 = Dtype*(
3554 double gcgd(0.0), gcgs(0.0), gcgb(0.0), gcbs(0.0), gcbd(0.0);
3566 gcgd = 0.0; gcgs = 0.0; gcgb = 0.0; gcbs = 0.0; gcbd = 0.0;
3573 double coef_Jdxp4 = Dtype*(
3578 double coef_Jdxp5 = Dtype*(
3583 double coef_Jdxp6 = Dtype*
3610 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
3758 int sizeInstances = instanceContainer_.size();
3759 for (
int i=0; i<sizeInstances; ++i)
3761 Instance & mi = *(instanceContainer_.at(i));
3877 .registerDevice(
"m", 3)
3878 .registerModelType(
"pmos", 3)
3879 .registerModelType(
"nmos", 3);
const InstanceName & getName() const
double * q_BulkEquSourcePrimeNodePtr
static std::vector< std::vector< int > > jacStamp
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
int ADrainPrimeEquBulkNodeOffset
static void initThermalModel(ParametricData< T > ¶metric_data)
Add the parameter "TEMPMODEL" to the parametric_data.
double * currStoVectorRawPtr
double * f_DrainPrimeEquDrainPrimeNodePtr
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
bool updateIntermediateVars()
bool updateDependentParameters()
double GateBulkOverlapCap
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
const DeviceOptions & deviceOptions_
double * q_BulkEquGateNodePtr
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
double * daeQVectorRawPtr
int ABulkEquDrainPrimeNodeOffset
int AGateEquBulkNodeOffset
static std::vector< std::vector< int > > jacMap2_DC_SC
double * q_SourcePrimeEquSourcePrimeNodePtr
int ASourcePrimeEquGateNodeOffset
double * dFdxdVpVectorRawPtr
double pnjlim(double vnew, double vold, double vt, double vcrit, int *icheck)
std::vector< int > devConMap
void qmeyer(double vgs, double vgd, double vgb, double von, double vdsat, double &capgs, double &capgd, double &capgb, double phi, double cox)
double * q_BulkEquDrainPrimeNodePtr
bool given(const std::string ¶meter_name) const
Pure virtual class to augment a linear system.
Parameter may be specified as time dependent expression from netlist.
std::vector< Instance * > instanceContainer
void addInternalNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
const std::string & getEncodedName() const
Return the instance name encoded as: [s:]*xname [s:]*Ytype!name [s:]*Utype!name!count.
double * currStaVectorRawPtr
double * f_SourcePrimeEquSourceNodePtr
static std::vector< std::vector< int > > jacStamp_DC
double gateBulkOverlapCapFactor
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
static void loadModelParameters(ParametricData< Model > &model_parameters)
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
void setNumStoreVars(int num_store_vars)
double getRandomPerturbation()
double * f_DrainEquDrainPrimeNodePtr
std::vector< double > gainScale
void makeVector(const std::string &cname, int len)
Allows the parameter to be specified as a vector.
std::vector< int > li_Neg
InstanceVector::const_iterator getInstanceEnd() const
Returns an iterator to the ending of the vector of all instances created for this device...
int ADrainEquDrainNodeOffset
double * f_GateEquSourcePrimeNodePtr
int ADrainEquDrainPrimeNodeOffset
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
double GateDrainOverlapCap
std::vector< int > li_Pos
Parameter is subject to being set to minimum junction capacitance.
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
virtual void registerJacLIDs(const JacobianStamp &jacLIDVec)
Parameter is subject to being set to minimum lead resistance.
double * q_GateEquSourcePrimeNodePtr
double fetlim(double vnew, double vold, double vto)
int ABulkEquSourcePrimeNodeOffset
double bulkJctBotGradingCoeff
double * f_SourcePrimeEquBulkNodePtr
double * f_SourcePrimeEquDrainPrimeNodePtr
double * f_SourcePrimeEquSourcePrimeNodePtr
double * storeLeadCurrQCompRawPtr
double * q_SourcePrimeEquSourceNodePtr
int ASourceEquSourcePrimeNodeOffset
int getNumStoreVars() const
double * f_GateEquGateNodePtr
InstanceVector::const_iterator getInstanceBegin() const
Returns an iterator to the beginning of the vector of all instances created for this device...
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
double contVgst(double vgst, double alpha, double vgstConst=3.0)
std::vector< Param > params
Parameters from the line.
std::vector< double > noiseDens
double * q_DrainEquDrainNodePtr
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
std::vector< std::string > noiseNames
double * f_DrainEquDrainNodePtr
void setParams(const std::vector< Param > ¶ms)
const std::string & getName() const
double * f_GateEquBulkNodePtr
bool processParams()
processParams
double * daeFVectorRawPtr
int ADrainPrimeEquDrainNodeOffset
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
virtual std::ostream & printOutInstances(std::ostream &os) const
double * f_DrainPrimeEquBulkNodePtr
const DeviceOptions & getDeviceOptions() const
double * f_BulkEquBulkNodePtr
double * q_DrainPrimeEquDrainPrimeNodePtr
double * f_BulkEquDrainPrimeNodePtr
double * nextStoVectorRawPtr
int getNumNoiseSources() const
double * f_SourceEquSourcePrimeNodePtr
double * q_DrainEquDrainPrimeNodePtr
double limvds(double vnew, double vold)
double * f_GateEquDrainPrimeNodePtr
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
double * q_SourcePrimeEquGateNodePtr
Linear::Matrix * dFdxMatrixPtr
const DeviceOptions & getDeviceOptions() const
Returns the device options given during device construction.
double * q_BulkEquBulkNodePtr
static std::vector< std::vector< int > > jacStamp_DC_SC
bool updateTemperature(const double &temp_tmp)
double GateSourceOverlapCap
int ABulkEquBulkNodeOffset
The Device class is an interface for device implementations.
double * f_SourcePrimeEquGateNodePtr
void addStoreNode(Util::SymbolTable &symbol_table, int index, const InstanceName &instance_name, const std::string &lead_name)
static std::vector< std::vector< int > > jacMap2
static std::vector< int > jacMap
double * f_SourceEquSourceNodePtr
int AGateEquDrainPrimeNodeOffset
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &Miter, const FactoryBlock &factory_block)
const SolverState & solverState_
int getGainScaleBlockID(int numBlocks)
double * dQdxdVpVectorRawPtr
Class Configuration contains device configuration data.
double * q_DrainPrimeEquBulkNodePtr
std::vector< double > lnNoiseDens
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
static std::vector< int > jacMap_SC
int ABulkEquGateNodeOffset
bool interpolateTNOM(double)
double * f_DrainPrimeEquGateNodePtr
void jacStampMap(const JacobianStamp &stamp_parent, IdVector &map_parent, JacobianStamp &map2_parent, JacobianStamp &stamp, IdVector &map, JacobianStamp &map2, int from, int to, int original_size)
double gateSourceOverlapCapFactor
double fastSurfaceStateDensity
double * f_DrainPrimeEquSourcePrimeNodePtr
int ASourcePrimeEquSourceNodeOffset
const SolverState & getSolverState() const
int ASourcePrimeEquBulkNodeOffset
double * q_DrainPrimeEquDrainNodePtr
static std::vector< std::vector< int > > jacStamp_SC
Linear::Vector * nextStoVectorPtr
double * q_SourcePrimeEquDrainPrimeNodePtr
Linear::Vector * currStaVectorPtr
double * q_SourceEquSourceNodePtr
int ADrainPrimeEquDrainPrimeNodeOffset
static std::vector< int > jacMap_DC_SC
double * nextStaVectorRawPtr
#define Xyce_NONPOINTER_MATRIX_LOAD
double * q_GateEquBulkNodePtr
void noiseSupport(double &noise, double &lnNoise, const int type, const double param, const double temp)
bool sideWallCapFactorGiven
const std::string & getType() const
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
double * f_BulkEquGateNodePtr
double contVds(double vds, double alpha, double min=0.3)
double bulkJctSideGradingCoeff
double * q_GateEquDrainPrimeNodePtr
double * q_DrainPrimeEquSourcePrimeNodePtr
double * q_GateEquGateNodePtr
Linear::Vector * currStoVectorPtr
static std::vector< int > jacMap_DC
int AGateEquSourcePrimeNodeOffset
const ExternData & extData
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
int ASourceEquSourceNodeOffset
const std::vector< std::vector< int > > & jacobianStamp() const
ModelBlock represents a .MODEL line from the netlist.
int ADrainPrimeEquGateNodeOffset
int ADrainPrimeEquSourcePrimeNodeOffset
int AGateEquGateNodeOffset
double * q_SourceEquSourcePrimeNodePtr
Manages parameter binding for class C.
double * q_DrainPrimeEquGateNodePtr
int ASourcePrimeEquSourcePrimeNodeOffset
InstanceBlock represent a device instance line from the netlist.
static std::vector< std::vector< int > > jacMap2_SC
std::vector< Param > params
int ASourcePrimeEquDrainPrimeNodeOffset
Linear::Matrix * dQdxMatrixPtr
double * f_DrainPrimeEquDrainNodePtr
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
double surfaceStateDensity
bool updatePrimaryState()
double * f_BulkEquSourcePrimeNodePtr
double * q_SourcePrimeEquBulkNodePtr
Linear::Vector * flagSolVectorPtr
static std::vector< std::vector< int > > jacMap2_DC
bool processInstanceParams()
processInstanceParams
const SolverState & getSolverState() const
Returns the solver state given during device construction.
void setModParams(const std::vector< Param > ¶ms)
double gateDrainOverlapCapFactor
double * nextSolVectorRawPtr
int numLeadCurrentStoreVars