From 72db3c9ba54715cfbc75c6f2a6203d9d9ecedf86 Mon Sep 17 00:00:00 2001 From: dwarning Date: Sun, 13 Mar 2011 17:49:24 +0000 Subject: [PATCH] skip printout in bsimtemp for sens analysis --- src/include/typedefs.h | 2 ++ src/spicelib/analysis/analysis.h | 4 +-- src/spicelib/devices/bsim3/b3temp.c | 36 ++++++++++++++--------- src/spicelib/devices/bsim3v32/b3v32temp.c | 36 ++++++++++++++--------- src/spicelib/devices/bsim4/b4temp.c | 35 ++++++++++++++-------- src/spicelib/devices/bsim4v5/b4v5temp.c | 35 ++++++++++++++-------- 6 files changed, 92 insertions(+), 56 deletions(-) diff --git a/src/include/typedefs.h b/src/include/typedefs.h index 5be134193..bda0098e0 100644 --- a/src/include/typedefs.h +++ b/src/include/typedefs.h @@ -44,4 +44,6 @@ typedef struct SENstruct SENstruct; typedef struct TSKtask TSKtask; typedef struct JOB JOB; +typedef struct SPICEanalysis SPICEanalysis; + #endif diff --git a/src/spicelib/analysis/analysis.h b/src/spicelib/analysis/analysis.h index 7711ca800..8f9b1fe5d 100644 --- a/src/spicelib/analysis/analysis.h +++ b/src/spicelib/analysis/analysis.h @@ -1,7 +1,7 @@ #ifndef _ANALYSIS_H #define _ANALYSIS_H -typedef struct { +struct SPICEanalysis { IFanalysis public; int size; int domain; @@ -10,7 +10,7 @@ typedef struct { int (*(askQuest))(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value); int (*an_init)(CKTcircuit *ckt, JOB *job); int (*an_func)(CKTcircuit *ckt, int restart); -} SPICEanalysis; +}; char *spice_analysis_get_name(int index); diff --git a/src/spicelib/devices/bsim3/b3temp.c b/src/spicelib/devices/bsim3/b3temp.c index 7f293da98..a04d80c02 100644 --- a/src/spicelib/devices/bsim3/b3temp.c +++ b/src/spicelib/devices/bsim3/b3temp.c @@ -28,6 +28,8 @@ #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 +extern SPICEanalysis *analInfo[]; +extern SPICEanalysis SENSinfo; /* ARGSUSED */ int @@ -43,7 +45,7 @@ double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double Nvtm, SourceSatCurrent, DrainSatCurrent; int Size_Not_Found; - /* loop through all the BSIM3 device models */ +/* loop through all the BSIM3 device models */ for (; model != NULL; model = model->BSIM3nextModel) { Temp = ckt->CKTtemp; if (model->BSIM3bulkJctPotential < 0.1) @@ -654,24 +656,30 @@ int Size_Not_Found; if (model->BSIM3k1Given || model->BSIM3k2Given) - { if (!model->BSIM3k1Given) - { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); + { if (!model->BSIM3k1Given) + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3k1 = 0.53; } if (!model->BSIM3k2Given) - { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3k2 = -0.0186; } - if (model->BSIM3nsubGiven) - fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); - if (model->BSIM3xtGiven) - fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); - if (model->BSIM3vbxGiven) - fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); - if (model->BSIM3gamma1Given) - fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); - if (model->BSIM3gamma2Given) - fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) { + if (model->BSIM3nsubGiven) + fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); + if (model->BSIM3xtGiven) + fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); + if (model->BSIM3vbxGiven) + fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); + if (model->BSIM3gamma1Given) + fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); + if (model->BSIM3gamma2Given) + fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + } } else { if (!model->BSIM3vbxGiven) diff --git a/src/spicelib/devices/bsim3v32/b3v32temp.c b/src/spicelib/devices/bsim3v32/b3v32temp.c index 2215dcdc8..16a094be6 100644 --- a/src/spicelib/devices/bsim3v32/b3v32temp.c +++ b/src/spicelib/devices/bsim3v32/b3v32temp.c @@ -27,6 +27,8 @@ #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 +extern SPICEanalysis *analInfo[]; +extern SPICEanalysis SENSinfo; /* ARGSUSED */ int @@ -723,27 +725,33 @@ int Size_Not_Found; if (model->BSIM3v32k1Given || model->BSIM3v32k2Given) - { if (!model->BSIM3v32k1Given) - { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); + { if (!model->BSIM3v32k1Given) + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3v32k1 = 0.53; } if (!model->BSIM3v32k2Given) - { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3v32k2 = -0.0186; } - if (model->BSIM3v32nsubGiven) - fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); - if (model->BSIM3v32xtGiven) - fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); - if (model->BSIM3v32vbxGiven) - fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); - if (model->BSIM3v32gamma1Given) - fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); - if (model->BSIM3v32gamma2Given) - fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) { + if (model->BSIM3v32nsubGiven) + fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); + if (model->BSIM3v32xtGiven) + fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); + if (model->BSIM3v32vbxGiven) + fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); + if (model->BSIM3v32gamma1Given) + fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); + if (model->BSIM3v32gamma2Given) + fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + } } else - { if (!model->BSIM3v32vbxGiven) + { if (!model->BSIM3v32vbxGiven) pParam->BSIM3v32vbx = pParam->BSIM3v32phi - 7.7348e-4 * pParam->BSIM3v32npeak * pParam->BSIM3v32xt * pParam->BSIM3v32xt; diff --git a/src/spicelib/devices/bsim4/b4temp.c b/src/spicelib/devices/bsim4/b4temp.c index 8c0174623..83e0692d3 100644 --- a/src/spicelib/devices/bsim4/b4temp.c +++ b/src/spicelib/devices/bsim4/b4temp.c @@ -29,6 +29,9 @@ #include "sperror.h" #include "suffix.h" +extern SPICEanalysis *analInfo[]; +extern SPICEanalysis SENSinfo; + #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 @@ -1281,24 +1284,30 @@ int Size_Not_Found, i; if (model->BSIM4k1Given || model->BSIM4k2Given) - { if (!model->BSIM4k1Given) - { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); + { if (!model->BSIM4k1Given) + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4k1 = 0.53; } if (!model->BSIM4k2Given) - { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4k2 = -0.0186; } - if (model->BSIM4nsubGiven) - fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); - if (model->BSIM4xtGiven) - fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); - if (model->BSIM4vbxGiven) - fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); - if (model->BSIM4gamma1Given) - fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); - if (model->BSIM4gamma2Given) - fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) { + if (model->BSIM4nsubGiven) + fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); + if (model->BSIM4xtGiven) + fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); + if (model->BSIM4vbxGiven) + fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); + if (model->BSIM4gamma1Given) + fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); + if (model->BSIM4gamma2Given) + fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + } } else { if (!model->BSIM4vbxGiven) diff --git a/src/spicelib/devices/bsim4v5/b4v5temp.c b/src/spicelib/devices/bsim4v5/b4v5temp.c index e3ae39e70..99f8b9a34 100644 --- a/src/spicelib/devices/bsim4v5/b4v5temp.c +++ b/src/spicelib/devices/bsim4v5/b4v5temp.c @@ -22,6 +22,9 @@ #include "sperror.h" #include "suffix.h" +extern SPICEanalysis *analInfo[]; +extern SPICEanalysis SENSinfo; + #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 @@ -1158,24 +1161,30 @@ int Size_Not_Found, i; if (model->BSIM4v5k1Given || model->BSIM4v5k2Given) - { if (!model->BSIM4v5k1Given) - { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); + { if (!model->BSIM4v5k1Given) + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4v5k1 = 0.53; } if (!model->BSIM4v5k2Given) - { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); + { + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) + fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4v5k2 = -0.0186; } - if (model->BSIM4v5nsubGiven) - fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); - if (model->BSIM4v5xtGiven) - fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); - if (model->BSIM4v5vbxGiven) - fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); - if (model->BSIM4v5gamma1Given) - fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); - if (model->BSIM4v5gamma2Given) - fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + if((!ckt->CKTcurJob) || (analInfo[ckt->CKTcurJob->JOBtype] != &SENSinfo)) { + if (model->BSIM4v5nsubGiven) + fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); + if (model->BSIM4v5xtGiven) + fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); + if (model->BSIM4v5vbxGiven) + fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); + if (model->BSIM4v5gamma1Given) + fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); + if (model->BSIM4v5gamma2Given) + fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); + } } else { if (!model->BSIM4v5vbxGiven)