bxxcheck.c, enable output path selection

This commit is contained in:
h_vogt 2017-02-26 11:43:18 +01:00 committed by rlar
parent 629000f039
commit c49ad41b6b
11 changed files with 55 additions and 32 deletions

View File

@ -18,6 +18,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM3checkModel(
@ -30,8 +31,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3v33check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3v33check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM3v3.3.0 Parameter Checking.\n");
if ((strncmp(model->BSIM3version, "3.3.0", 5)) && (strncmp(model->BSIM3version, "3.30", 4)) && (strncmp(model->BSIM3version, "3.3", 3)))
@ -449,7 +451,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -18,6 +18,7 @@ Modified by Paolo Nenzi 2002
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
B3SOIDDcheckModel(B3SOIDDmodel *model, B3SOIDDinstance *here, CKTcircuit *ckt)
@ -27,8 +28,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3soiddv2check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3soiddv2check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "B3SOI(DD)V2.1 Parameter Check\n");
fprintf(fplog, "Model = %s\n", model->B3SOIDDmodName);
@ -501,7 +503,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -18,6 +18,7 @@ File: b3soifdcheck.c 98/5/01
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
B3SOIFDcheckModel(B3SOIFDmodel *model, B3SOIFDinstance *here, CKTcircuit *ckt)
@ -28,7 +29,9 @@ FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3soifdv2check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3soifdv2check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "B3SOI (FD) Version 2.1 Parameter Check\n");
fprintf(fplog, "Model = %s\n", model->B3SOIFDmodName);
@ -501,7 +504,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -22,6 +22,7 @@ Modifies by Paolo Nenzi 2002
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
B3SOIPDcheckModel(B3SOIPDmodel *model, B3SOIPDinstance *here, CKTcircuit *ckt)
@ -31,8 +32,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3soipdv223check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3soipdv223check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "B3SOIPDV223 Parameter Check\n");
fprintf(fplog, "Model = %s\n", model->B3SOIPDmodName);
@ -736,7 +738,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -19,6 +19,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM3v1checkModel(BSIM3v1model *model, BSIM3v1instance *here, CKTcircuit *ckt)
@ -28,8 +29,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3v3_1check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3v3_1check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM3V3.1 Parameter Check\n");
fprintf(fplog, "Model = %s\n", model->BSIM3v1modName);
@ -360,7 +362,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -18,6 +18,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM3v32checkModel (BSIM3v32model *model, BSIM3v32instance *here, CKTcircuit *ckt)
@ -27,8 +28,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b3v32check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b3v32check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf (fplog,
@ -452,7 +454,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -66,6 +66,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM4checkModel(
@ -76,8 +77,9 @@ CKTcircuit *ckt)
struct bsim4SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen("bsim4.out", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("bsim4.out");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n");
@ -1011,7 +1013,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -22,6 +22,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM4v5checkModel(
@ -32,8 +33,9 @@ CKTcircuit *ckt)
struct bsim4v5SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen("bsim4v5.out", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("bsim4v5.out");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4v5: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n");
@ -810,7 +812,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -27,6 +27,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM4v6checkModel(
@ -37,8 +38,9 @@ CKTcircuit *ckt)
struct bsim4v6SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen("bsim4v6.out", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("bsim4v6.out");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4v6: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n");
@ -870,7 +872,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -28,6 +28,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
BSIM4v7checkModel(
@ -38,8 +39,9 @@ CKTcircuit *ckt)
struct bsim4SizeDependParam *pParam;
int Fatal_Flag = 0;
FILE *fplog;
if ((fplog = fopen("bsim4.out", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("bsim4v7.out");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "BSIM4v7: Berkeley Short Channel IGFET Model-4\n");
fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n");
@ -893,7 +895,7 @@ FILE *fplog;
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}

View File

@ -24,6 +24,7 @@
#include "ngspice/sperror.h"
#include "ngspice/devdefs.h"
#include "ngspice/suffix.h"
#include "ngspice/fteext.h"
int
B4SOIcheckModel(
@ -36,8 +37,9 @@ int Fatal_Flag = 0;
FILE *fplog;
NG_IGNORE(ckt);
if ((fplog = fopen("b4soiv1check.log", "w")) != NULL)
/* add user defined path (nname has to be freed after usage) */
char *nname = set_output_path("b4soiv1check.log");
if ((fplog = fopen(nname, "w")) != NULL)
{ pParam = here->pParam;
fprintf(fplog, "B4SOIV3 Parameter Check\n");
fprintf(fplog, "Model = %s\n", model->B4SOImodName);
@ -1018,7 +1020,7 @@ if (model->B4SOInpeak > 1.0e20)
else
{ fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n");
}
tfree(nname);
return(Fatal_Flag);
}