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

📄 b3soifdcheck.c

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 C
📖 第 1 页 / 共 2 页
字号:
/**********Copyright 1999 Regents of the University of California.  All rights reserved.Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen TangModified by Paolo Nenzi 2002File: b3soifdcheck.c          98/5/01**********//* * Revision 2.1  99/9/27 Pin Su  * BSIMFD2.1 release */#include "ngspice.h"#include "cktdefs.h"#include "b3soifddef.h"#include "trandefs.h"#include "const.h"#include "sperror.h"#include "devdefs.h"#include "suffix.h"intB3SOIFDcheckModel(B3SOIFDmodel *model, B3SOIFDinstance *here, CKTcircuit *ckt){struct b3soifdSizeDependParam *pParam;int Fatal_Flag = 0;FILE *fplog;        if ((fplog = fopen("b3soifdv2check.log", "w")) != NULL)    {   pParam = here->pParam;	fprintf(fplog, "B3SOI (FD) Version 2.1 Parameter Check\n");	fprintf(fplog, "Model = %s\n", model->B3SOIFDmodName);	fprintf(fplog, "W = %g, L = %g M = %g\n", here->B3SOIFDw, 	        here->B3SOIFDl, here->B3SOIFDm);   	                if (pParam->B3SOIFDnlx < -pParam->B3SOIFDleff)	    {   fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n",			pParam->B3SOIFDnlx);	        printf("Fatal: Nlx = %g is less than -Leff.\n",			pParam->B3SOIFDnlx);		Fatal_Flag = 1;            }	if (model->B3SOIFDtox <= 0.0)	{   fprintf(fplog, "Fatal: Tox = %g is not positive.\n",		    model->B3SOIFDtox);	    printf("Fatal: Tox = %g is not positive.\n", model->B3SOIFDtox);	    Fatal_Flag = 1;	}	if (model->B3SOIFDtbox <= 0.0)	{   fprintf(fplog, "Fatal: Tbox = %g is not positive.\n",		    model->B3SOIFDtbox);	    printf("Fatal: Tbox = %g is not positive.\n", model->B3SOIFDtbox);	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDnpeak <= 0.0)	{   fprintf(fplog, "Fatal: Nch = %g is not positive.\n",		    pParam->B3SOIFDnpeak);	    printf("Fatal: Nch = %g is not positive.\n",		   pParam->B3SOIFDnpeak);	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDngate < 0.0)	{   fprintf(fplog, "Fatal: Ngate = %g is not positive.\n",		    pParam->B3SOIFDngate);	    printf("Fatal: Ngate = %g Ngate is not positive.\n",		   pParam->B3SOIFDngate);	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDngate > 1.e25)	{   fprintf(fplog, "Fatal: Ngate = %g is too high.\n",		    pParam->B3SOIFDngate);	    printf("Fatal: Ngate = %g Ngate is too high\n",		   pParam->B3SOIFDngate);	    Fatal_Flag = 1;	}	if (model->B3SOIFDdvbd1 < 0.0)	{   fprintf(fplog, "Fatal: Dvbd1 = %g is negative.\n",		    model->B3SOIFDdvbd1);   	    printf("Fatal: Dvbd1 = %g is negative.\n", model->B3SOIFDdvbd1);   	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDdvt1 < 0.0)	{   fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n",		    pParam->B3SOIFDdvt1);   	    printf("Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIFDdvt1);   	    Fatal_Flag = 1;	}	    	if (pParam->B3SOIFDdvt1w < 0.0)	{   fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n",		    pParam->B3SOIFDdvt1w);	    printf("Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIFDdvt1w);	    Fatal_Flag = 1;	}	    	if (pParam->B3SOIFDw0 == -pParam->B3SOIFDweff)	{   fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n");	    printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n");	    Fatal_Flag = 1;        }   	if (pParam->B3SOIFDdsub < 0.0)	{   fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->B3SOIFDdsub);	    printf("Fatal: Dsub = %g is negative.\n", pParam->B3SOIFDdsub);	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDb1 == -pParam->B3SOIFDweff)	{   fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");	    printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n");	    Fatal_Flag = 1;        }          if (pParam->B3SOIFDu0temp <= 0.0)	{   fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIFDu0temp);	    printf("Fatal: u0 at current temperature = %g is not positive.\n",		   pParam->B3SOIFDu0temp);	    Fatal_Flag = 1;        }    /* Check delta parameter */              if (pParam->B3SOIFDdelta < 0.0)	{   fprintf(fplog, "Fatal: Delta = %g is less than zero.\n",		    pParam->B3SOIFDdelta);	    printf("Fatal: Delta = %g is less than zero.\n", pParam->B3SOIFDdelta);	    Fatal_Flag = 1;        }      	if (pParam->B3SOIFDvsattemp <= 0.0)	{   fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIFDvsattemp);	    printf("Fatal: Vsat at current temperature = %g is not positive.\n",		   pParam->B3SOIFDvsattemp);	    Fatal_Flag = 1;	}/* Check Rout parameters */	if (pParam->B3SOIFDpclm <= 0.0)	{   fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->B3SOIFDpclm);	    printf("Fatal: Pclm = %g is not positive.\n", pParam->B3SOIFDpclm);	    Fatal_Flag = 1;	}	if (pParam->B3SOIFDdrout < 0.0)	{   fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->B3SOIFDdrout);	    printf("Fatal: Drout = %g is negative.\n", pParam->B3SOIFDdrout);	    Fatal_Flag = 1;	}      if ( model->B3SOIFDunitLengthGateSidewallJctCap > 0.0)      {	if (here->B3SOIFDdrainPerimeter < pParam->B3SOIFDweff)	{   fprintf(fplog, "Warning: Pd = %g is less than W.\n",		    here->B3SOIFDdrainPerimeter);	   printf("Warning: Pd = %g is less than W.\n",		    here->B3SOIFDdrainPerimeter);            here->B3SOIFDdrainPerimeter =pParam->B3SOIFDweff; 	}	if (here->B3SOIFDsourcePerimeter < pParam->B3SOIFDweff)	{   fprintf(fplog, "Warning: Ps = %g is less than W.\n",		    here->B3SOIFDsourcePerimeter);	   printf("Warning: Ps = %g is less than W.\n",		    here->B3SOIFDsourcePerimeter);            here->B3SOIFDsourcePerimeter =pParam->B3SOIFDweff;	}      }/* Check capacitance parameters */        if (pParam->B3SOIFDclc < 0.0)	{   fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->B3SOIFDclc);	    printf("Fatal: Clc = %g is negative.\n", pParam->B3SOIFDclc);	    Fatal_Flag = 1;        }            if (model->B3SOIFDparamChk ==1)      {/* Check L and W parameters */ 	if (pParam->B3SOIFDleff <= 5.0e-8)	{   fprintf(fplog, "Warning: Leff = %g may be too small.\n",	            pParam->B3SOIFDleff);	    printf("Warning: Leff = %g may be too small.\n",		    pParam->B3SOIFDleff);	}    		if (pParam->B3SOIFDleffCV <= 5.0e-8)	{   fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n",		    pParam->B3SOIFDleffCV);	    printf("Warning: Leff for CV = %g may be too small.\n",		   pParam->B3SOIFDleffCV);	}  	        if (pParam->B3SOIFDweff <= 1.0e-7)	{   fprintf(fplog, "Warning: Weff = %g may be too small.\n",		    pParam->B3SOIFDweff);	    printf("Warning: Weff = %g may be too small.\n",		   pParam->B3SOIFDweff);	}             		if (pParam->B3SOIFDweffCV <= 1.0e-7)	{   fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n",		    pParam->B3SOIFDweffCV);	    printf("Warning: Weff for CV = %g may be too small.\n",		   pParam->B3SOIFDweffCV);	}        	/* Check threshold voltage parameters */	if (pParam->B3SOIFDnlx < 0.0)	{   fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->B3SOIFDnlx);	   printf("Warning: Nlx = %g is negative.\n", pParam->B3SOIFDnlx);        }	if (model->B3SOIFDtox < 1.0e-9)	{   fprintf(fplog, "Warning: Tox = %g is less than 10A.\n",	            model->B3SOIFDtox);	    printf("Warning: Tox = %g is less than 10A.\n", model->B3SOIFDtox);        }        if (pParam->B3SOIFDnpeak <= 1.0e15)	{   fprintf(fplog, "Warning: Nch = %g may be too small.\n",	            pParam->B3SOIFDnpeak);	    printf("Warning: Nch = %g may be too small.\n",	           pParam->B3SOIFDnpeak);	}	else if (pParam->B3SOIFDnpeak >= 1.0e21)	{   fprintf(fplog, "Warning: Nch = %g may be too large.\n",	            pParam->B3SOIFDnpeak);	    printf("Warning: Nch = %g may be too large.\n",	           pParam->B3SOIFDnpeak);	}	if (fabs(pParam->B3SOIFDnsub) >= 1.0e21)	{   fprintf(fplog, "Warning: Nsub = %g may be too large.\n",	            pParam->B3SOIFDnsub);	    printf("Warning: Nsub = %g may be too large.\n",	           pParam->B3SOIFDnsub);	}	if ((pParam->B3SOIFDngate > 0.0) &&	    (pParam->B3SOIFDngate <= 1.e18))	{   fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n",	            pParam->B3SOIFDngate);	    printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n",	           pParam->B3SOIFDngate);	}        if (model->B3SOIFDdvbd0 < 0.0)	{   fprintf(fplog, "Warning: Dvbd0 = %g is negative.\n",		    model->B3SOIFDdvbd0);   	    printf("Warning: Dvbd0 = %g is negative.\n", model->B3SOIFDdvbd0);   	}               if (pParam->B3SOIFDdvt0 < 0.0)	{   fprintf(fplog, "Warning: Dvt0 = %g is negative.\n",		    pParam->B3SOIFDdvt0);   	    printf("Warning: Dvt0 = %g is negative.\n", pParam->B3SOIFDdvt0);   

⌨️ 快捷键说明

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