📄 b4set.c
字号:
if (!model->BSIM4DjctSidewallSatCurDensityGiven) model->BSIM4DjctSidewallSatCurDensity = model->BSIM4SjctSidewallSatCurDensity; if (!model->BSIM4SjctGateSidewallSatCurDensityGiven) model->BSIM4SjctGateSidewallSatCurDensity = 0.0; if (!model->BSIM4DjctGateSidewallSatCurDensityGiven) model->BSIM4DjctGateSidewallSatCurDensity = model->BSIM4SjctGateSidewallSatCurDensity; if (!model->BSIM4SbulkJctPotentialGiven) model->BSIM4SbulkJctPotential = 1.0; if (!model->BSIM4DbulkJctPotentialGiven) model->BSIM4DbulkJctPotential = model->BSIM4SbulkJctPotential; if (!model->BSIM4SsidewallJctPotentialGiven) model->BSIM4SsidewallJctPotential = 1.0; if (!model->BSIM4DsidewallJctPotentialGiven) model->BSIM4DsidewallJctPotential = model->BSIM4SsidewallJctPotential; if (!model->BSIM4SGatesidewallJctPotentialGiven) model->BSIM4SGatesidewallJctPotential = model->BSIM4SsidewallJctPotential; if (!model->BSIM4DGatesidewallJctPotentialGiven) model->BSIM4DGatesidewallJctPotential = model->BSIM4SGatesidewallJctPotential; if (!model->BSIM4SbulkJctBotGradingCoeffGiven) model->BSIM4SbulkJctBotGradingCoeff = 0.5; if (!model->BSIM4DbulkJctBotGradingCoeffGiven) model->BSIM4DbulkJctBotGradingCoeff = model->BSIM4SbulkJctBotGradingCoeff; if (!model->BSIM4SbulkJctSideGradingCoeffGiven) model->BSIM4SbulkJctSideGradingCoeff = 0.33; if (!model->BSIM4DbulkJctSideGradingCoeffGiven) model->BSIM4DbulkJctSideGradingCoeff = model->BSIM4SbulkJctSideGradingCoeff; if (!model->BSIM4SbulkJctGateSideGradingCoeffGiven) model->BSIM4SbulkJctGateSideGradingCoeff = model->BSIM4SbulkJctSideGradingCoeff; if (!model->BSIM4DbulkJctGateSideGradingCoeffGiven) model->BSIM4DbulkJctGateSideGradingCoeff = model->BSIM4SbulkJctGateSideGradingCoeff; if (!model->BSIM4SjctEmissionCoeffGiven) model->BSIM4SjctEmissionCoeff = 1.0; if (!model->BSIM4DjctEmissionCoeffGiven) model->BSIM4DjctEmissionCoeff = model->BSIM4SjctEmissionCoeff; if (!model->BSIM4SjctTempExponentGiven) model->BSIM4SjctTempExponent = 3.0; if (!model->BSIM4DjctTempExponentGiven) model->BSIM4DjctTempExponent = model->BSIM4SjctTempExponent; if (!model->BSIM4jtssGiven) model->BSIM4jtss = 0.0; if (!model->BSIM4jtsdGiven) model->BSIM4jtsd = model->BSIM4jtss; if (!model->BSIM4jtsswsGiven) model->BSIM4jtssws = 0.0; if (!model->BSIM4jtsswdGiven) model->BSIM4jtsswd = model->BSIM4jtssws; if (!model->BSIM4jtsswgsGiven) model->BSIM4jtsswgs = 0.0; if (!model->BSIM4jtsswgdGiven) model->BSIM4jtsswgd = model->BSIM4jtsswgs; if (!model->BSIM4njtsGiven) model->BSIM4njts = 20.0; if (!model->BSIM4njtsswGiven) model->BSIM4njtssw = 20.0; if (!model->BSIM4njtsswgGiven) model->BSIM4njtsswg = 20.0; if (!model->BSIM4xtssGiven) model->BSIM4xtss = 0.02; if (!model->BSIM4xtsdGiven) model->BSIM4xtsd = model->BSIM4xtss; if (!model->BSIM4xtsswsGiven) model->BSIM4xtssws = 0.02; if (!model->BSIM4jtsswdGiven) model->BSIM4xtsswd = model->BSIM4xtssws; if (!model->BSIM4xtsswgsGiven) model->BSIM4xtsswgs = 0.02; if (!model->BSIM4xtsswgdGiven) model->BSIM4xtsswgd = model->BSIM4xtsswgs; if (!model->BSIM4tnjtsGiven) model->BSIM4tnjts = 0.0; if (!model->BSIM4tnjtsswGiven) model->BSIM4tnjtssw = 0.0; if (!model->BSIM4tnjtsswgGiven) model->BSIM4tnjtsswg = 0.0; if (!model->BSIM4vtssGiven) model->BSIM4vtss = 10.0; if (!model->BSIM4vtsdGiven) model->BSIM4vtsd = model->BSIM4vtss; if (!model->BSIM4vtsswsGiven) model->BSIM4vtssws = 10.0; if (!model->BSIM4vtsswdGiven) model->BSIM4vtsswd = model->BSIM4vtssws; if (!model->BSIM4vtsswgsGiven) model->BSIM4vtsswgs = 10.0; if (!model->BSIM4vtsswgdGiven) model->BSIM4vtsswgd = model->BSIM4vtsswgs; if (!model->BSIM4oxideTrapDensityAGiven) { if (model->BSIM4type == NMOS) model->BSIM4oxideTrapDensityA = 6.25e41; else model->BSIM4oxideTrapDensityA= 6.188e40; } if (!model->BSIM4oxideTrapDensityBGiven) { if (model->BSIM4type == NMOS) model->BSIM4oxideTrapDensityB = 3.125e26; else model->BSIM4oxideTrapDensityB = 1.5e25; } if (!model->BSIM4oxideTrapDensityCGiven) model->BSIM4oxideTrapDensityC = 8.75e9; if (!model->BSIM4emGiven) model->BSIM4em = 4.1e7; /* V/m */ if (!model->BSIM4efGiven) model->BSIM4ef = 1.0; if (!model->BSIM4afGiven) model->BSIM4af = 1.0; if (!model->BSIM4kfGiven) model->BSIM4kf = 0.0; /* stress effect */ if (!model->BSIM4sarefGiven) model->BSIM4saref = 1e-6; /* m */ if (!model->BSIM4sbrefGiven) model->BSIM4sbref = 1e-6; /* m */ if (!model->BSIM4wlodGiven) model->BSIM4wlod = 0; /* m */ if (!model->BSIM4ku0Given) model->BSIM4ku0 = 0; /* 1/m */ if (!model->BSIM4kvsatGiven) model->BSIM4kvsat = 0; if (!model->BSIM4kvth0Given) /* m */ model->BSIM4kvth0 = 0; if (!model->BSIM4tku0Given) model->BSIM4tku0 = 0; if (!model->BSIM4llodku0Given) model->BSIM4llodku0 = 0; if (!model->BSIM4wlodku0Given) model->BSIM4wlodku0 = 0; if (!model->BSIM4llodvthGiven) model->BSIM4llodvth = 0; if (!model->BSIM4wlodvthGiven) model->BSIM4wlodvth = 0; if (!model->BSIM4lku0Given) model->BSIM4lku0 = 0; if (!model->BSIM4wku0Given) model->BSIM4wku0 = 0; if (!model->BSIM4pku0Given) model->BSIM4pku0 = 0; if (!model->BSIM4lkvth0Given) model->BSIM4lkvth0 = 0; if (!model->BSIM4wkvth0Given) model->BSIM4wkvth0 = 0; if (!model->BSIM4pkvth0Given) model->BSIM4pkvth0 = 0; if (!model->BSIM4stk2Given) model->BSIM4stk2 = 0; if (!model->BSIM4lodk2Given) model->BSIM4lodk2 = 1.0; if (!model->BSIM4steta0Given) model->BSIM4steta0 = 0; if (!model->BSIM4lodeta0Given) model->BSIM4lodeta0 = 1.0; DMCGeff = model->BSIM4dmcg - model->BSIM4dmcgt; DMCIeff = model->BSIM4dmci; DMDGeff = model->BSIM4dmdg - model->BSIM4dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ for (here = model->BSIM4instances; here != NULL ; here=here->BSIM4nextInstance) { if (here->BSIM4owner == ARCHme) { /* allocate a chunk of the state vector */ here->BSIM4states = *states; *states += BSIM4numStates; } /* perform the parameter defaulting */ if (!here->BSIM4lGiven) here->BSIM4l = 5.0e-6; if (!here->BSIM4wGiven) here->BSIM4w = 5.0e-6; if (!here->BSIM4mGiven) here->BSIM4m = 1.0; if (!here->BSIM4nfGiven) here->BSIM4nf = 1.0; if (!here->BSIM4minGiven) here->BSIM4min = 0; /* integer */ if (!here->BSIM4icVDSGiven) here->BSIM4icVDS = 0.0; if (!here->BSIM4icVGSGiven) here->BSIM4icVGS = 0.0; if (!here->BSIM4icVBSGiven) here->BSIM4icVBS = 0.0; if (!here->BSIM4drainAreaGiven) here->BSIM4drainArea = 0.0; if (!here->BSIM4drainPerimeterGiven) here->BSIM4drainPerimeter = 0.0; if (!here->BSIM4drainSquaresGiven) here->BSIM4drainSquares = 1.0; if (!here->BSIM4sourceAreaGiven) here->BSIM4sourceArea = 0.0; if (!here->BSIM4sourcePerimeterGiven) here->BSIM4sourcePerimeter = 0.0; if (!here->BSIM4sourceSquaresGiven) here->BSIM4sourceSquares = 1.0; if (!here->BSIM4saGiven) here->BSIM4sa = 0.0; if (!here->BSIM4sbGiven) here->BSIM4sb = 0.0; if (!here->BSIM4sdGiven) here->BSIM4sd = 0.0; if (!here->BSIM4rbdbGiven) here->BSIM4rbdb = model->BSIM4rbdb; /* in ohm */ if (!here->BSIM4rbsbGiven) here->BSIM4rbsb = model->BSIM4rbsb; if (!here->BSIM4rbpbGiven) here->BSIM4rbpb = model->BSIM4rbpb; if (!here->BSIM4rbpsGiven) here->BSIM4rbps = model->BSIM4rbps; if (!here->BSIM4rbpdGiven) here->BSIM4rbpd = model->BSIM4rbpd; /* Process instance model selectors, some * may override their global counterparts */ if (!here->BSIM4rbodyModGiven) here->BSIM4rbodyMod = model->BSIM4rbodyMod; else if ((here->BSIM4rbodyMod != 0) && (here->BSIM4rbodyMod != 1)) { here->BSIM4rbodyMod = model->BSIM4rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", model->BSIM4rbodyMod); } if (!here->BSIM4rgateModGiven) here->BSIM4rgateMod = model->BSIM4rgateMod; else if ((here->BSIM4rgateMod != 0) && (here->BSIM4rgateMod != 1) && (here->BSIM4rgateMod != 2) && (here->BSIM4rgateMod != 3)) { here->BSIM4rgateMod = model->BSIM4rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->BSIM4rgateMod); } if (!here->BSIM4geoModGiven) here->BSIM4geoMod = model->BSIM4geoMod; if (!here->BSIM4rgeoModGiven) here->BSIM4rgeoMod = 0; if (!here->BSIM4trnqsModGiven) here->BSIM4trnqsMod = model->BSIM4trnqsMod; else if ((here->BSIM4trnqsMod != 0) && (here->BSIM4trnqsMod != 1)) { here->BSIM4trnqsMod = model->BSIM4trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", model->BSIM4trnqsMod); } if (!here->BSIM4acnqsModGiven) here->BSIM4acnqsMod = model->BSIM4acnqsMod; else if ((here->BSIM4acnqsMod != 0) && (here->BSIM4acnqsMod != 1)) { here->BSIM4acnqsMod = model->BSIM4acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM4acnqsMod); } /* stress effect */ if (!here->BSIM4saGiven) here->BSIM4sa = 0.0; if (!here->BSIM4sbGiven) here->BSIM4sb = 0.0; if (!here->BSIM4sdGiven) here->BSIM4sd = 0.0; /* process drain series resistance */ createNode = 0; if ( (model->BSIM4rdsMod != 0) || (model->BSIM4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4sheetResistance > 0) { if (here->BSIM4drainSquaresGiven && here->BSIM4drainSquares > 0) { createNode = 1; } else if (!here->BSIM4drainSquaresGiven && (here->BSIM4rgeoMod != 0)) { BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, here->BSIM4w, model->BSIM4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 && (here->BSIM4dNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"drain"); if(error) return(error); here->BSIM4dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->BSIM4dNodePrime = here->BSIM4dNode; } /* process source series resistance */ createNode = 0; if ( (model->BSIM4rdsMod != 0) || (model->BSIM4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4sheetResistance > 0) { if (here->BSIM4sourceSquaresGiven && here->BSIM4sourceSquares > 0) { createNode = 1; } else if (!here->BSIM4sourceSquaresGiven && (here->BSIM4rgeoMod != 0)) { BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, here->BSIM4w, model->BSIM4sheetResistance, DMCGe
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -