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

📄 b3soiddset.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
📖 第 1 页 / 共 4 页
字号:
            model->B3SOIDDpdvt2w = 0.0;        if (!model->B3SOIDDpu0Given)            model->B3SOIDDpu0 = 0.0;        if (!model->B3SOIDDpuaGiven)            model->B3SOIDDpua = 0.0;        if (!model->B3SOIDDpubGiven)            model->B3SOIDDpub = 0.0;        if (!model->B3SOIDDpucGiven)            model->B3SOIDDpuc = 0.0;        if (!model->B3SOIDDpvsatGiven)            model->B3SOIDDpvsat = 0.0;        if (!model->B3SOIDDpa0Given)            model->B3SOIDDpa0 = 0.0;        if (!model->B3SOIDDpagsGiven)            model->B3SOIDDpags = 0.0;        if (!model->B3SOIDDpb0Given)            model->B3SOIDDpb0 = 0.0;        if (!model->B3SOIDDpb1Given)            model->B3SOIDDpb1 = 0.0;        if (!model->B3SOIDDpketaGiven)            model->B3SOIDDpketa = 0.0;        if (!model->B3SOIDDpabpGiven)            model->B3SOIDDpabp = 0.0;        if (!model->B3SOIDDpmxcGiven)            model->B3SOIDDpmxc = 0.0;        if (!model->B3SOIDDpadice0Given)            model->B3SOIDDpadice0 = 0.0;        if (!model->B3SOIDDpa1Given)            model->B3SOIDDpa1 = 0.0;        if (!model->B3SOIDDpa2Given)            model->B3SOIDDpa2 = 0.0;        if (!model->B3SOIDDprdswGiven)            model->B3SOIDDprdsw = 0.0;        if (!model->B3SOIDDpprwbGiven)            model->B3SOIDDpprwb = 0.0;        if (!model->B3SOIDDpprwgGiven)            model->B3SOIDDpprwg = 0.0;        if (!model->B3SOIDDpwrGiven)            model->B3SOIDDpwr = 0.0;        if (!model->B3SOIDDpnfactorGiven)            model->B3SOIDDpnfactor = 0.0;        if (!model->B3SOIDDpdwgGiven)            model->B3SOIDDpdwg = 0.0;        if (!model->B3SOIDDpdwbGiven)            model->B3SOIDDpdwb = 0.0;        if (!model->B3SOIDDpvoffGiven)            model->B3SOIDDpvoff = 0.0;        if (!model->B3SOIDDpeta0Given)            model->B3SOIDDpeta0 = 0.0;        if (!model->B3SOIDDpetabGiven)            model->B3SOIDDpetab = 0.0;        if (!model->B3SOIDDpdsubGiven)            model->B3SOIDDpdsub = 0.0;        if (!model->B3SOIDDpcitGiven)            model->B3SOIDDpcit = 0.0;        if (!model->B3SOIDDpcdscGiven)            model->B3SOIDDpcdsc = 0.0;        if (!model->B3SOIDDpcdscbGiven)            model->B3SOIDDpcdscb = 0.0;        if (!model->B3SOIDDpcdscdGiven)            model->B3SOIDDpcdscd = 0.0;        if (!model->B3SOIDDppclmGiven)            model->B3SOIDDppclm = 0.0;        if (!model->B3SOIDDppdibl1Given)            model->B3SOIDDppdibl1 = 0.0;        if (!model->B3SOIDDppdibl2Given)            model->B3SOIDDppdibl2 = 0.0;        if (!model->B3SOIDDppdiblbGiven)            model->B3SOIDDppdiblb = 0.0;        if (!model->B3SOIDDpdroutGiven)            model->B3SOIDDpdrout = 0.0;        if (!model->B3SOIDDppvagGiven)            model->B3SOIDDppvag = 0.0;        if (!model->B3SOIDDpdeltaGiven)            model->B3SOIDDpdelta = 0.0;        if (!model->B3SOIDDpaiiGiven)            model->B3SOIDDpaii = 0.0;        if (!model->B3SOIDDpbiiGiven)            model->B3SOIDDpbii = 0.0;        if (!model->B3SOIDDpciiGiven)            model->B3SOIDDpcii = 0.0;        if (!model->B3SOIDDpdiiGiven)            model->B3SOIDDpdii = 0.0;        if (!model->B3SOIDDpalpha0Given)            model->B3SOIDDpalpha0 = 0.0;        if (!model->B3SOIDDpalpha1Given)            model->B3SOIDDpalpha1 = 0.0;        if (!model->B3SOIDDpbeta0Given)            model->B3SOIDDpbeta0 = 0.0;        if (!model->B3SOIDDpagidlGiven)            model->B3SOIDDpagidl = 0.0;        if (!model->B3SOIDDpbgidlGiven)            model->B3SOIDDpbgidl = 0.0;        if (!model->B3SOIDDpngidlGiven)            model->B3SOIDDpngidl = 0.0;        if (!model->B3SOIDDpntunGiven)            model->B3SOIDDpntun = 0.0;        if (!model->B3SOIDDpndiodeGiven)            model->B3SOIDDpndiode = 0.0;        if (!model->B3SOIDDpisbjtGiven)            model->B3SOIDDpisbjt = 0.0;        if (!model->B3SOIDDpisdifGiven)            model->B3SOIDDpisdif = 0.0;        if (!model->B3SOIDDpisrecGiven)            model->B3SOIDDpisrec = 0.0;        if (!model->B3SOIDDpistunGiven)            model->B3SOIDDpistun = 0.0;        if (!model->B3SOIDDpedlGiven)            model->B3SOIDDpedl = 0.0;        if (!model->B3SOIDDpkbjt1Given)            model->B3SOIDDpkbjt1 = 0.0;	/* CV Model */        if (!model->B3SOIDDpvsdfbGiven)            model->B3SOIDDpvsdfb = 0.0;        if (!model->B3SOIDDpvsdthGiven)            model->B3SOIDDpvsdth = 0.0;/* Added for binning - END */	if (!model->B3SOIDDcfGiven)            model->B3SOIDDcf = 2.0 * EPSOX / PI			   * log(1.0 + 0.4e-6 / model->B3SOIDDtox);        if (!model->B3SOIDDcgdoGiven)	{   if (model->B3SOIDDdlcGiven && (model->B3SOIDDdlc > 0.0))	    {   model->B3SOIDDcgdo = model->B3SOIDDdlc * model->B3SOIDDcox				 - model->B3SOIDDcgdl ;	    }	    else	        model->B3SOIDDcgdo = 0.6 * model->B3SOIDDxj * model->B3SOIDDcox; 	}        if (!model->B3SOIDDcgsoGiven)	{   if (model->B3SOIDDdlcGiven && (model->B3SOIDDdlc > 0.0))	    {   model->B3SOIDDcgso = model->B3SOIDDdlc * model->B3SOIDDcox				 - model->B3SOIDDcgsl ;	    }	    else	        model->B3SOIDDcgso = 0.6 * model->B3SOIDDxj * model->B3SOIDDcox; 	}        if (!model->B3SOIDDcgeoGiven)	{   model->B3SOIDDcgeo = 0.0;	}        if (!model->B3SOIDDxpartGiven)            model->B3SOIDDxpart = 0.0;        if (!model->B3SOIDDsheetResistanceGiven)            model->B3SOIDDsheetResistance = 0.0;        if (!model->B3SOIDDcsdeswGiven)            model->B3SOIDDcsdesw = 0.0;        if (!model->B3SOIDDunitLengthGateSidewallJctCapGiven)            model->B3SOIDDunitLengthGateSidewallJctCap = 1e-10;        if (!model->B3SOIDDGatesidewallJctPotentialGiven)            model->B3SOIDDGatesidewallJctPotential = 0.7;        if (!model->B3SOIDDbodyJctGateSideGradingCoeffGiven)            model->B3SOIDDbodyJctGateSideGradingCoeff = 0.5;        if (!model->B3SOIDDoxideTrapDensityAGiven)	{   if (model->B3SOIDDtype == NMOS)                model->B3SOIDDoxideTrapDensityA = 1e20;            else                model->B3SOIDDoxideTrapDensityA=9.9e18;	}        if (!model->B3SOIDDoxideTrapDensityBGiven)	{   if (model->B3SOIDDtype == NMOS)                model->B3SOIDDoxideTrapDensityB = 5e4;            else                model->B3SOIDDoxideTrapDensityB = 2.4e3;	}        if (!model->B3SOIDDoxideTrapDensityCGiven)	{   if (model->B3SOIDDtype == NMOS)                model->B3SOIDDoxideTrapDensityC = -1.4e-12;            else                model->B3SOIDDoxideTrapDensityC = 1.4e-12;	}        if (!model->B3SOIDDemGiven)            model->B3SOIDDem = 4.1e7; /* V/m */        if (!model->B3SOIDDefGiven)            model->B3SOIDDef = 1.0;        if (!model->B3SOIDDafGiven)            model->B3SOIDDaf = 1.0;        if (!model->B3SOIDDkfGiven)            model->B3SOIDDkf = 0.0;        if (!model->B3SOIDDnoifGiven)            model->B3SOIDDnoif = 1.0;        /* loop through all the instances of the model */        for (here = model->B3SOIDDinstances; here != NULL ;             here=here->B3SOIDDnextInstance) 	{   	            if (here->B3SOIDDowner == ARCHme)            {                /* allocate a chunk of the state vector */		    here->B3SOIDDstates = *states;                    *states += B3SOIDDnumStates;	    }	    	    /* perform the parameter defaulting */            if (!here->B3SOIDDdrainAreaGiven)                here->B3SOIDDdrainArea = 0.0;            if (!here->B3SOIDDdrainPerimeterGiven)                here->B3SOIDDdrainPerimeter = 0.0;            if (!here->B3SOIDDdrainSquaresGiven)                here->B3SOIDDdrainSquares = 1.0;            if (!here->B3SOIDDicVBSGiven)                here->B3SOIDDicVBS = 0;            if (!here->B3SOIDDicVDSGiven)                here->B3SOIDDicVDS = 0;            if (!here->B3SOIDDicVGSGiven)                here->B3SOIDDicVGS = 0;            if (!here->B3SOIDDicVESGiven)                here->B3SOIDDicVES = 0;            if (!here->B3SOIDDicVPSGiven)                here->B3SOIDDicVPS = 0;	    if (!here->B3SOIDDbjtoffGiven)		here->B3SOIDDbjtoff = 0;	    if (!here->B3SOIDDdebugModGiven)		here->B3SOIDDdebugMod = 0;	    if (!here->B3SOIDDrth0Given)		here->B3SOIDDrth0 = model->B3SOIDDrth0;	    if (!here->B3SOIDDcth0Given)		here->B3SOIDDcth0 = model->B3SOIDDcth0;            if (!here->B3SOIDDbodySquaresGiven)                here->B3SOIDDbodySquares = 1.0;            if (!here->B3SOIDDlGiven)                here->B3SOIDDl = 5e-6;            if (!here->B3SOIDDsourceAreaGiven)                here->B3SOIDDsourceArea = 0;            if (!here->B3SOIDDsourcePerimeterGiven)                here->B3SOIDDsourcePerimeter = 0;            if (!here->B3SOIDDsourceSquaresGiven)                here->B3SOIDDsourceSquares = 1;            if (!here->B3SOIDDwGiven)                here->B3SOIDDw = 5e-6;            	    if (!here->B3SOIDDmGiven)                here->B3SOIDDm = 1;	    	    if (!here->B3SOIDDoffGiven)                here->B3SOIDDoff = 0;            /* process drain series resistance */            if ((model->B3SOIDDsheetResistance > 0.0) &&                 (here->B3SOIDDdrainSquares > 0.0 ) &&                (here->B3SOIDDdNodePrime == 0))	    {   error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"drain");                if(error) return(error);                here->B3SOIDDdNodePrime = tmp->number;		if (ckt->CKTcopyNodesets) {		  if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) {                     if (tmpNode->nsGiven) {                       tmp->nodeset=tmpNode->nodeset;                        tmp->nsGiven=tmpNode->nsGiven;                      }                  }                }            }	    else	    {   here->B3SOIDDdNodePrime = here->B3SOIDDdNode;            }                               /* process source series resistance */            if ((model->B3SOIDDsheetResistance > 0.0) &&                 (here->B3SOIDDsourceSquares > 0.0 ) &&                (here->B3SOIDDsNodePrime == 0)) 	    {   error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"source");                if(error) return(error);                here->B3SOIDDsNodePrime = tmp->number;				 if (ckt->CKTcopyNodesets) {                  if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) {                     if (tmpNode->nsGiven) {                       tmp->nodeset=tmpNode->nodeset;                        tmp->nsGiven=tmpNode->nsGiven;                      }                  }                }		            }	    else 	    {   here->B3SOIDDsNodePrime = here->B3SOIDDsNode;            }            /* process effective silicon film thickness */            model->B3SOIDDcbox = 3.453133e-11 / model->B3SOIDDtbox;            model->B3SOIDDcsi = 1.03594e-10 / model->B3SOIDDtsi;            Cboxt = model->B3SOIDDcbox * model->B3SOIDDcsi / (model->B3SOIDDcbox + model->B3SOIDDcsi);            model->B3SOIDDqsi = Charge_q*model->B3SOIDDnpeak*1e6*model->B3SOIDDtsi;            /* Tsieff */            tmp1 = 2.0 * EPSSI * model->B3SOIDDvbsa / Charge_q                  / (1e6*model->B3SOIDDnpeak);            tmp2 = model->B3SOIDDtsi * model->B3SOIDDtsi;            if (tmp2 < tmp1)            {               fprintf(stderr, "vbsa = %.3f is too large for this tsi = %.3e and is automatically set to zero\n", model->B3SOIDDvbsa, model->B3SOIDDtsi);               model->B3SOIDDcsieff = model->B3SOIDDcsi;               model->B3SOIDDqsieff = model->B3SOIDDqsi;            }            else            {               tmp1 = sqrt(model->B3SOIDDtsi * model->B3SOIDDtsi -                       2.0 * EPSSI * model->B3SOIDDvbsa / Charge_q /                       (1e6*model->B3SOIDDnpeak));               model->B3SOIDDcsieff = 1.03594e-10 / tmp1;               model->B3SOIDDqsieff = Charge_q*model->B3SOIDDnpeak*1e6*tmp1;            }            model->B3SOIDDcsit = 1/(1/model->B3SOIDDcox + 1/model->B3SOIDDcsieff);            model->B3SOIDDcboxt = 1/(1/model->B3SOIDDcbox + 1/model->B3SOIDDcsieff);            nfb0 = 1/(1 + model->B3SOIDDcbox / model->B3SOIDDcsit);            model->B3SOIDDnfb = model->B3SOIDDkb3 * nfb0;            model->B3SOIDDadice = model->B3SOIDDadice0  / ( 1 + Cboxt / model->B3SOIDDcox);            here->B3SOIDDfloat = 0;	    if (here->B3SOIDDbNode == -1)             /* no body contact but bNode to be created for SPICE iteration */            {  error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"Body");               if(error) return(error);               here->B3SOIDDbNode = tmp->number;               here->B3SOIDDpNode = 0;               here->B3SOIDDfloat = 1;               here->B3SOIDDbodyMod = 0;	    }            else /* if body tied */             { /* ideal body tie */               if ((model->B3SOIDDrbody == 0.0) && (model->B3SOIDDrbsh == 0.0))               {                  here->B3SOIDDbodyMod = 2;                  /* pNode is not used in this case */               }               else {                   error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Body");                  if(error) return(error);                  here->B3SOIDDbodyMod = 1;                  here->B3SOIDDpNode = here->B3SOIDDbNode;                  here->B3SOIDDbNode = tmp->number;               }            }            if ((model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0!=0))            {	        error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"Temp");                if(error) return(error);                   here->B3SOIDDtempNode = tmp->number;            } else {                here->B3SOIDDtempNode = 0;            }

⌨️ 快捷键说明

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