Browse Source

ancient configure options removed

pre-master-46
dwarning 16 years ago
parent
commit
b4d3cc8646
  1. 6
      ChangeLog
  2. 25
      configure.ac
  3. 6
      src/frontend/misccoms.c
  4. 6
      src/spicelib/devices/mos1/mos1dset.c
  5. 20
      src/spicelib/devices/mos1/mos1load.c
  6. 20
      src/spicelib/devices/mos2/mos2dset.c
  7. 20
      src/spicelib/devices/mos2/mos2load.c
  8. 12
      src/spicelib/devices/mos3/mos3dset.c
  9. 20
      src/spicelib/devices/mos3/mos3load.c
  10. 20
      src/spicelib/devices/mos6/mos6load.c
  11. 12
      src/spicelib/devices/mos9/mos9dset.c
  12. 20
      src/spicelib/devices/mos9/mos9load.c
  13. 6
      visualc/include/config.h

6
ChangeLog

@ -1,3 +1,9 @@
2010-11-06 Dietmar Warning
* configure.ac, visualc/include/config.h, frontend/miscoms.c, mos1-9/*.c
* remove two really ancient configuration options:
* NOSQRT: Nobody want use log/exp instead of sqrt
* CAPZEROBYPASS: Nobody want calculate 0.0 * x
2010-11-04 Robert Larice
* src/misc/string.c ,
* src/misc/stringutil.h :

25
configure.ac

@ -48,7 +48,6 @@ dnl --enable-gprof: add -pg option to the compiler (GCC)
AC_ARG_ENABLE(gprof,
AS_HELP_STRING([--enable-gprof],[Produce gprof profiling data in 'gmon.out' (GCC only).]))
dnl --enable-checker: add --with-checker-debug option to the compiler
AC_ARG_ENABLE(checker,
AS_HELP_STRING([--enable-checkergcc],[Option for compilation with checkergcc]))
@ -57,10 +56,6 @@ dnl --enable-gc: Enable Boehm-Weiser Conservative Garbage Collector
AC_ARG_ENABLE(checker,
AS_HELP_STRING([--enable-gc],[Use Boehm-Weiser Conservative Garbage Collector. Disabled by default.]))
dnl --enable-nosqrt: define NOSQRT for the code
AC_ARG_ENABLE(nosqrt,
AS_HELP_STRING([--enable-nosqrt],[Use always log/exp for nonlinear capacitances]))
dnl --enable-nobypass: define NOBYPASS for the code
AC_ARG_ENABLE(nobypass,
AS_HELP_STRING([--enable-nobypass],[Don't bypass recalculations of slowly changing variables]))
@ -69,17 +64,13 @@ dnl --enable-capbypass: define CAPBYPASS for the code
AC_ARG_ENABLE(capbypass,
AS_HELP_STRING([--enable-capbypass],[Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd voltages are unchanged]))
AC_ARG_ENABLE(capzerobypass,
AS_HELP_STRING([--enable-capzerobypass],[Bypass all the cbd/cbs calculations if Czero is zero. (default=enabled)]),
[],[enable_capzerobypass=yes])
dnl --enable-nodelimiting: define NODELIMITING for the code
AC_ARG_ENABLE(nodelimiting,
AS_HELP_STRING([--enable-nodelimiting],[Experimental damping scheme]))
AS_HELP_STRING([--enable-nodelimiting],[Experimental damping scheme.]))
dnl --enable-predictor: define PREDICTOR for the code
AC_ARG_ENABLE(predictor,
AS_HELP_STRING([--enable-predictor],[Enable a predictor method for convergence]))
AS_HELP_STRING([--enable-predictor],[Enable a predictor method for convergence.]))
dnl --enable-newpred: define NEWPRED for the code
AC_ARG_ENABLE(newpred,
@ -87,11 +78,11 @@ AC_ARG_ENABLE(newpred,
dnl --enable-newtrunc: define NEWTRUNC for the code
AC_ARG_ENABLE(newtrunc,
AS_HELP_STRING([--enable-newtrunc],[Enable the newtrunc option]))
AS_HELP_STRING([--enable-newtrunc],[Enable, how we want extrapolate capacitances.]))
dnl --enable-sense2: define WANT_SENSE2 for the code
AC_ARG_ENABLE(sense2,
AS_HELP_STRING([--enable-sense2],[Use spice2 sensitivity analysis]))
AS_HELP_STRING([--enable-sense2],[Use spice2 sensitivity analysis.]))
dnl --enable-ftedebug: enable frontend debug macros
AC_ARG_ENABLE(ftedebug,
@ -745,18 +736,10 @@ if test "$enable_nobypass" = "yes"; then
AC_DEFINE(NOBYPASS,[],[Define if we want NOBYPASS])
AC_MSG_RESULT(NOBYPASS option enabled)
fi
if test "$enable_nosqrt" = "yes"; then
AC_DEFINE(NOSQRT,[],[Define to use always exp/log for bulk diode calculations in mosfets])
AC_MSG_RESULT(NOSQRT option enabled)
fi
if test "$enable_capbypass" = "yes"; then
AC_DEFINE(CAPBYPASS,[],[Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd])
AC_MSG_RESULT(CAPBYPASS option enabled)
fi
if test "$enable_capzerobypass" = "yes"; then
AC_DEFINE(CAPZEROBYPASS,[],[Define if we want to bypass cbd/cbs calculation if Czero is zero])
AC_MSG_RESULT(CAPZEROBYPASS option enabled)
fi
if test "$enable_nodelimiting" = "yes"; then
AC_DEFINE(NODELIMITING,[],[Experimental code never implemented to damp Newton iterations])
AC_MSG_RESULT(NODELIMITING option enabled)

6
src/frontend/misccoms.c

@ -200,18 +200,12 @@ com_version(wordlist *wl)
fprintf(cp_out,"** XSPICE extensions included\n");
#endif
fprintf(cp_out,"** Relevant compilation options (refer to user's manual):\n");
#ifdef NOSQRT
fprintf(cp_out,"** --enable-nosqrt\n");
#endif
#ifdef NOBYPASS
fprintf(cp_out,"** --enable-nobypass\n");
#endif
#ifdef CAPBYPASS
fprintf(cp_out,"** --enable-capbypass\n");
#endif
#ifdef CAPZEROBYPASS
fprintf(cp_out,"** --enable-capzerobypass\n");
#endif
#ifdef NODELIMITING
fprintf(cp_out,"** --enable-nodelimiting\n");
#endif

6
src/spicelib/devices/mos1/mos1dset.c

@ -317,7 +317,6 @@ MOS1dSetup(GENmodel *inModel, CKTcircuit *ckt)
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS1bulkJctBotGradingCoeff ==
model->MOS1bulkJctSideGradingCoeff) {
if(model->MOS1bulkJctBotGradingCoeff == .5) {
@ -331,21 +330,16 @@ MOS1dSetup(GENmodel *inModel, CKTcircuit *ckt)
if(model->MOS1bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS1bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS1bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS1bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
/*
lcapbs=here->MOS1Cbs*sarg+
here->MOS1Cbssw*sargsw;

20
src/spicelib/devices/mos1/mos1load.c

@ -565,9 +565,7 @@ next1: if(vbs <= -3*vt) {
{
/* can't bypass the diode capacitance calculations */
#ifdef CAPZEROBYPASS
if(here->MOS1Cbs != 0 || here->MOS1Cbssw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbs < here->MOS1tDepCap){
arg=1-vbs/here->MOS1tBulkPot;
/*
@ -577,7 +575,6 @@ next1: if(vbs <= -3*vt) {
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS1bulkJctBotGradingCoeff ==
model->MOS1bulkJctSideGradingCoeff) {
if(model->MOS1bulkJctBotGradingCoeff == .5) {
@ -591,21 +588,16 @@ next1: if(vbs <= -3*vt) {
if(model->MOS1bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS1bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS1bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS1bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS1qbs) =
here->MOS1tBulkPot*(here->MOS1Cbs*
(1-arg*sarg)/(1-model->MOS1bulkJctBotGradingCoeff)
@ -619,12 +611,10 @@ next1: if(vbs <= -3*vt) {
vbs*(here->MOS1f2s+vbs*(here->MOS1f3s/2));
here->MOS1capbs=here->MOS1f2s+here->MOS1f3s*vbs;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS1qbs) = 0;
here->MOS1capbs=0;
}
#endif /*CAPZEROBYPASS*/
}
#ifdef CAPBYPASS
if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) ||
@ -635,9 +625,7 @@ next1: if(vbs <= -3*vt) {
/* can't bypass the diode capacitance calculations */
{
#ifdef CAPZEROBYPASS
if(here->MOS1Cbd != 0 || here->MOS1Cbdsw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbd < here->MOS1tDepCap) {
arg=1-vbd/here->MOS1tBulkPot;
/*
@ -647,7 +635,6 @@ next1: if(vbs <= -3*vt) {
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS1bulkJctBotGradingCoeff == .5 &&
model->MOS1bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -655,21 +642,16 @@ next1: if(vbs <= -3*vt) {
if(model->MOS1bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS1bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS1bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS1bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS1qbd) =
here->MOS1tBulkPot*(here->MOS1Cbd*
(1-arg*sarg)
@ -684,12 +666,10 @@ next1: if(vbs <= -3*vt) {
vbd * (here->MOS1f2d + vbd * here->MOS1f3d/2);
here->MOS1capbd=here->MOS1f2d + vbd * here->MOS1f3d;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS1qbd) = 0;
here->MOS1capbd = 0;
}
#endif /*CAPZEROBYPASS*/
}
/*

20
src/spicelib/devices/mos2/mos2dset.c

@ -1144,10 +1144,11 @@ doneval:
arg=1-vbs/here->MOS2tBulkPot;
/*
* the following block looks somewhat long and messy,
* but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time.
* but since most users use the default grading
* coefficients of .5, and sqrt is MUCH faster than an
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS2bulkJctBotGradingCoeff ==
model->MOS2bulkJctSideGradingCoeff) {
if(model->MOS2bulkJctBotGradingCoeff == .5) {
@ -1161,21 +1162,16 @@ doneval:
if(model->MOS2bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS2bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS2bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS2bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbs=here->MOS2Cbs*sarg+
here->MOS2Cbssw*sargsw;
lcapbs2 = model->MOS2type*0.5/here->MOS2tBulkPot*(
@ -1201,10 +1197,11 @@ doneval:
arg=1-vbd/here->MOS2tBulkPot;
/*
* the following block looks somewhat long and messy,
* but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time.
* but since most users use the default grading
* coefficients of .5, and sqrt is MUCH faster than an
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS2bulkJctBotGradingCoeff == .5 &&
model->MOS2bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -1212,21 +1209,16 @@ doneval:
if(model->MOS2bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS2bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS2bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS2bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbd=here->MOS2Cbd*sarg+
here->MOS2Cbdsw*sargsw;
lcapbd2 = model->MOS2type*0.5/here->MOS2tBulkPot*(

20
src/spicelib/devices/mos2/mos2load.c

@ -1040,9 +1040,7 @@ doneval:
{
/* can't bypass the diode capacitance calculations */
#ifdef CAPZEROBYPASS
if(here->MOS2Cbs != 0 || here->MOS2Cbssw != 0) {
#endif /*CAPZEROBYPASS*/
if (vbs < here->MOS2tDepCap){
arg=1-vbs/here->MOS2tBulkPot;
/*
@ -1052,7 +1050,6 @@ doneval:
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS2bulkJctBotGradingCoeff ==
model->MOS2bulkJctSideGradingCoeff) {
if(model->MOS2bulkJctBotGradingCoeff == .5) {
@ -1066,21 +1063,16 @@ doneval:
if(model->MOS2bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS2bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS2bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS2bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS2qbs) =
here->MOS2tBulkPot*(here->MOS2Cbs*
(1-arg*sarg)/(1-model->MOS2bulkJctBotGradingCoeff)
@ -1094,12 +1086,10 @@ doneval:
vbs*(here->MOS2f2s+vbs*(here->MOS2f3s/2));
here->MOS2capbs=here->MOS2f2s+here->MOS2f3s*vbs;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS2qbs) = 0;
here->MOS2capbs=0;
}
#endif /*CAPZEROBYPASS*/
}
#ifdef CAPBYPASS
if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) ||
@ -1110,9 +1100,7 @@ doneval:
/* can't bypass the diode capacitance calculations */
{
#ifdef CAPZEROBYPASS
if(here->MOS2Cbd != 0 || here->MOS2Cbdsw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbd < here->MOS2tDepCap) {
arg=1-vbd/here->MOS2tBulkPot;
/*
@ -1122,7 +1110,6 @@ doneval:
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS2bulkJctBotGradingCoeff == .5 &&
model->MOS2bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -1130,21 +1117,16 @@ doneval:
if(model->MOS2bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS2bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS2bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS2bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS2qbd) =
here->MOS2tBulkPot*(here->MOS2Cbd*
(1-arg*sarg)
@ -1159,12 +1141,10 @@ doneval:
vbd * (here->MOS2f2d + vbd * here->MOS2f3d/2);
here->MOS2capbd=here->MOS2f2d + vbd * here->MOS2f3d;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS2qbd) = 0;
here->MOS2capbd = 0;
}
#endif /*CAPZEROBYPASS*/
}
if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2;

12
src/spicelib/devices/mos3/mos3dset.c

@ -698,7 +698,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS3bulkJctBotGradingCoeff ==
model->MOS3bulkJctSideGradingCoeff) {
if(model->MOS3bulkJctBotGradingCoeff == .5) {
@ -712,21 +711,16 @@ innerline1000:;
if(model->MOS3bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS3bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS3bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS3bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbs=here->MOS3Cbs*sarg+
here->MOS3Cbssw*sargsw;
lcapbs2 = model->MOS3type*0.5/here->MOS3tBulkPot*(
@ -757,7 +751,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS3bulkJctBotGradingCoeff == .5 &&
model->MOS3bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -765,21 +758,16 @@ innerline1000:;
if(model->MOS3bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS3bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS3bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS3bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbd=here->MOS3Cbd*sarg+
here->MOS3Cbdsw*sargsw;
lcapbd2 = model->MOS3type*0.5/here->MOS3tBulkPot*(

20
src/spicelib/devices/mos3/mos3load.c

@ -904,9 +904,7 @@ innerline1000:;
{
/* can't bypass the diode capacitance calculations */
#ifdef CAPZEROBYPASS
if(here->MOS3Cbs != 0 || here->MOS3Cbssw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbs < here->MOS3tDepCap){
arg=1-vbs/here->MOS3tBulkPot;
/*
@ -916,7 +914,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS3bulkJctBotGradingCoeff ==
model->MOS3bulkJctSideGradingCoeff) {
if(model->MOS3bulkJctBotGradingCoeff == .5) {
@ -930,21 +927,16 @@ innerline1000:;
if(model->MOS3bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS3bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS3bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS3bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS3qbs) =
here->MOS3tBulkPot*(here->MOS3Cbs*
(1-arg*sarg)/(1-model->MOS3bulkJctBotGradingCoeff)
@ -958,12 +950,10 @@ innerline1000:;
vbs*(here->MOS3f2s+vbs*(here->MOS3f3s/2));
here->MOS3capbs=here->MOS3f2s+here->MOS3f3s*vbs;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS3qbs) = 0;
here->MOS3capbs=0;
}
#endif /*CAPZEROBYPASS*/
}
#ifdef CAPBYPASS
if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) ||
@ -973,9 +963,7 @@ innerline1000:;
#endif /*CAPBYPASS*/
/* can't bypass the diode capacitance calculations */
{
#ifdef CAPZEROBYPASS
if(here->MOS3Cbd != 0 || here->MOS3Cbdsw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbd < here->MOS3tDepCap) {
arg=1-vbd/here->MOS3tBulkPot;
/*
@ -985,7 +973,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS3bulkJctBotGradingCoeff == .5 &&
model->MOS3bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -993,21 +980,16 @@ innerline1000:;
if(model->MOS3bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS3bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS3bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS3bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS3qbd) =
here->MOS3tBulkPot*(here->MOS3Cbd*
(1-arg*sarg)
@ -1022,12 +1004,10 @@ innerline1000:;
vbd * (here->MOS3f2d + vbd * here->MOS3f3d/2);
here->MOS3capbd=here->MOS3f2d + vbd * here->MOS3f3d;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS3qbd) = 0;
here->MOS3capbd = 0;
}
#endif /*CAPZEROBYPASS*/
}
if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2;

20
src/spicelib/devices/mos6/mos6load.c

@ -577,9 +577,7 @@ next1: if(vbs <= -3*vt) {
#endif /*CAPBYPASS*/
{
/* can't bypass the diode capacitance calculations */
#ifdef CAPZEROBYPASS
if(here->MOS6Cbs != 0 || here->MOS6Cbssw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbs < here->MOS6tDepCap){
arg=1-vbs/here->MOS6tBulkPot;
/*
@ -589,7 +587,6 @@ next1: if(vbs <= -3*vt) {
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS6bulkJctBotGradingCoeff ==
model->MOS6bulkJctSideGradingCoeff) {
if(model->MOS6bulkJctBotGradingCoeff == .5) {
@ -603,21 +600,16 @@ next1: if(vbs <= -3*vt) {
if(model->MOS6bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS6bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS6bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS6bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS6qbs) =
here->MOS6tBulkPot*(here->MOS6Cbs*
(1-arg*sarg)/(1-model->MOS6bulkJctBotGradingCoeff)
@ -631,12 +623,10 @@ next1: if(vbs <= -3*vt) {
vbs*(here->MOS6f2s+vbs*(here->MOS6f3s/2));
here->MOS6capbs=here->MOS6f2s+here->MOS6f3s*vbs;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS6qbs) = 0;
here->MOS6capbs=0;
}
#endif /*CAPZEROBYPASS*/
}
#ifdef CAPBYPASS
if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) ||
@ -646,9 +636,7 @@ next1: if(vbs <= -3*vt) {
#endif /*CAPBYPASS*/
/* can't bypass the diode capacitance calculations */
{
#ifdef CAPZEROBYPASS
if(here->MOS6Cbd != 0 || here->MOS6Cbdsw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbd < here->MOS6tDepCap) {
arg=1-vbd/here->MOS6tBulkPot;
/*
@ -658,7 +646,6 @@ next1: if(vbs <= -3*vt) {
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS6bulkJctBotGradingCoeff == .5 &&
model->MOS6bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -666,21 +653,16 @@ next1: if(vbs <= -3*vt) {
if(model->MOS6bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS6bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS6bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS6bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS6qbd) =
here->MOS6tBulkPot*(here->MOS6Cbd*
(1-arg*sarg)
@ -695,12 +677,10 @@ next1: if(vbs <= -3*vt) {
vbd * (here->MOS6f2d + vbd * here->MOS6f3d/2);
here->MOS6capbd=here->MOS6f2d + vbd * here->MOS6f3d;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS6qbd) = 0;
here->MOS6capbd = 0;
}
#endif /*CAPZEROBYPASS*/
}
/*

12
src/spicelib/devices/mos9/mos9dset.c

@ -700,7 +700,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS9bulkJctBotGradingCoeff ==
model->MOS9bulkJctSideGradingCoeff) {
if(model->MOS9bulkJctBotGradingCoeff == .5) {
@ -714,21 +713,16 @@ innerline1000:;
if(model->MOS9bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS9bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS9bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS9bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbs=here->MOS9Cbs*sarg+
here->MOS9Cbssw*sargsw;
lcapbs2 = model->MOS9type*0.5/here->MOS9tBulkPot*(
@ -759,7 +753,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS9bulkJctBotGradingCoeff == .5 &&
model->MOS9bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -767,21 +760,16 @@ innerline1000:;
if(model->MOS9bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS9bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS9bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS9bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
lcapbd=here->MOS9Cbd*sarg+
here->MOS9Cbdsw*sargsw;
lcapbd2 = model->MOS9type*0.5/here->MOS9tBulkPot*(

20
src/spicelib/devices/mos9/mos9load.c

@ -914,9 +914,7 @@ innerline1000:;
#endif /*CAPBYPASS*/
{
/* can't bypass the diode capacitance calculations */
#ifdef CAPZEROBYPASS
if(here->MOS9Cbs != 0 || here->MOS9Cbssw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbs < here->MOS9tDepCap){
arg=1-vbs/here->MOS9tBulkPot;
/*
@ -926,7 +924,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS9bulkJctBotGradingCoeff ==
model->MOS9bulkJctSideGradingCoeff) {
if(model->MOS9bulkJctBotGradingCoeff == .5) {
@ -940,21 +937,16 @@ innerline1000:;
if(model->MOS9bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS9bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS9bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS9bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS9qbs) =
here->MOS9tBulkPot*(here->MOS9Cbs*
(1-arg*sarg)/(1-model->MOS9bulkJctBotGradingCoeff)
@ -968,12 +960,10 @@ innerline1000:;
vbs*(here->MOS9f2s+vbs*(here->MOS9f3s/2));
here->MOS9capbs=here->MOS9f2s+here->MOS9f3s*vbs;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS9qbs) = 0;
here->MOS9capbs=0;
}
#endif /*CAPZEROBYPASS*/
}
#ifdef CAPBYPASS
if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) ||
@ -983,9 +973,7 @@ innerline1000:;
#endif /*CAPBYPASS*/
/* can't bypass the diode capacitance calculations */
{
#ifdef CAPZEROBYPASS
if(here->MOS9Cbd != 0 || here->MOS9Cbdsw != 0 ) {
#endif /*CAPZEROBYPASS*/
if (vbd < here->MOS9tDepCap) {
arg=1-vbd/here->MOS9tBulkPot;
/*
@ -995,7 +983,6 @@ innerline1000:;
* exp(log()) we use this special case code to buy time.
* (as much as 10% of total job time!)
*/
#ifndef NOSQRT
if(model->MOS9bulkJctBotGradingCoeff == .5 &&
model->MOS9bulkJctSideGradingCoeff == .5) {
sarg = sargsw = 1/sqrt(arg);
@ -1003,21 +990,16 @@ innerline1000:;
if(model->MOS9bulkJctBotGradingCoeff == .5) {
sarg = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sarg = exp(-model->MOS9bulkJctBotGradingCoeff*
log(arg));
#ifndef NOSQRT
}
if(model->MOS9bulkJctSideGradingCoeff == .5) {
sargsw = 1/sqrt(arg);
} else {
#endif /*NOSQRT*/
sargsw =exp(-model->MOS9bulkJctSideGradingCoeff*
log(arg));
#ifndef NOSQRT
}
}
#endif /*NOSQRT*/
*(ckt->CKTstate0 + here->MOS9qbd) =
here->MOS9tBulkPot*(here->MOS9Cbd*
(1-arg*sarg)
@ -1032,12 +1014,10 @@ innerline1000:;
vbd * (here->MOS9f2d + vbd * here->MOS9f3d/2);
here->MOS9capbd=here->MOS9f2d + vbd * here->MOS9f3d;
}
#ifdef CAPZEROBYPASS
} else {
*(ckt->CKTstate0 + here->MOS9qbd) = 0;
here->MOS9capbd = 0;
}
#endif /*CAPZEROBYPASS*/
}
if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2;

6
visualc/include/config.h

@ -11,9 +11,6 @@
/* Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd */
/* #undef CAPBYPASS */
/* Define if we want to bypass cbd/cbs calculation if Czero is zero */
#define CAPZEROBYPASS
/* The CIDER enhancements */
#define CIDER 1
@ -465,9 +462,6 @@
/* Experimental code never implemented to damp Newton iterations */
/* #undef NODELIMITING */
/* Define to use always exp/log for bulk diode calculations in mosfets */
/* #undef NOSQRT */
/* Name of package */
#define PACKAGE "ngspice"

Loading…
Cancel
Save