46 #include <Xyce_config.h>
59 #include <N_ERH_ErrorMgr.h>
60 #include <N_IO_CmdParse.h>
61 #include <N_UTL_Misc.h>
62 #include <N_UTL_OptionBlock.h>
96 testJac_absTol(1.0e-8),
97 testJac_SqrtEta(1.0e-8),
98 deviceSens_dp(1.0e-8),
102 numericalJacobianFlag (false),
103 testJacobianFlag (false),
105 testJacStopStep(Util::MachineDependentParams::IntMax()),
107 testJacDeviceName(
""),
108 testJacDeviceNameGiven( false ),
109 voltageLimiterFlag (true),
111 icMultiplier (10000.0),
112 defaultMaxTimeStep (1.0e99),
115 numGainScaleBlocks(1),
116 staggerGainScale(false),
117 randomizeVgstConst(false),
124 zeroResistanceTol(1.0e-100),
125 checkForZeroResistance(true),
128 debugMinTimestep (0),
129 debugMaxTimestep (Util::MachineDependentParams::IntMax()),
131 debugMaxTime (Util::MachineDependentParams::DoubleMax()),
133 blockAnalysisFlag (false),
134 #ifndef Xyce_NEW_EXCESS_PHASE
135 newExcessPhase (false),
136 defaultNewExcessPhase (false),
138 newExcessPhase (true),
139 defaultNewExcessPhase (true),
141 excessPhaseScalar1 (1.0),
142 excessPhaseScalar2 (1.0),
144 tryToCompact (false),
145 calculateAllLeadCurrents (false),
170 std::list<Util::Param>::const_iterator iter = OB.getParams().begin();
171 std::list<Util::Param>::const_iterator end = OB.getParams().end();
173 for ( ; iter != end; ++iter)
175 std::string tag(iter->uTag());
177 if (tag ==
"DEFAD")
defad = iter->getImmutableValue<
double>();
178 else if (tag ==
"DEFAS")
defas = iter->getImmutableValue<
double>();
179 else if (tag ==
"DEFL")
defl = iter->getImmutableValue<
double>();
180 else if (tag ==
"DEFW")
defw = iter->getImmutableValue<
double>();
181 else if (tag ==
"ABSTOL")
abstol = iter->getImmutableValue<
double>();
182 else if (tag ==
"RELTOL")
reltol = iter->getImmutableValue<
double>();
183 else if (tag ==
"CHGTOL")
chgtol = iter->getImmutableValue<
double>();
184 else if (tag ==
"GMIN")
gmin = iter->getImmutableValue<
double>();
185 else if (tag ==
"GMINSCALAR")
gmin_scalar = iter->getImmutableValue<
double>();
186 else if (tag ==
"GMAX")
gmax = iter->getImmutableValue<
double>();
187 else if (tag ==
"TJRELTOL")
testJac_relTol = iter->getImmutableValue<
double>();
188 else if (tag ==
"TJABSTOL")
testJac_absTol = iter->getImmutableValue<
double>();
189 else if (tag ==
"TJSQRTETA")
testJac_SqrtEta = iter->getImmutableValue<
double>();
190 else if (tag ==
"SENSDP")
deviceSens_dp = iter->getImmutableValue<
double>();
191 else if (tag ==
"TNOM")
tnom = iter->getImmutableValue<
double>()+
CONSTCtoK;
192 else if (tag ==
"TEMP")
195 if ( !iter->isTimeDependent() )
temp.setVal(iter->getImmutableValue<
double>()+
CONSTCtoK);
196 else {
temp.setVal( iter->stringValue() );
temp.setTimeDependent(
true ); }
198 else if (tag ==
"SCALESRC")
scale_src = iter->getImmutableValue<
double>();
199 else if (tag ==
"NUMJAC")
201 else if (tag ==
"TESTJAC")
203 else if (tag ==
"TESTJACSTARTSTEP")
205 else if (tag ==
"TESTJACSTOPSTEP")
207 else if (tag ==
"TESTJACWARN")
208 testJacWarn =
static_cast<bool> (iter->getImmutableValue<
int>());
209 else if (tag ==
"TESTJACDEVICENAME")
214 else if (tag ==
"VOLTLIM")
216 else if (tag ==
"LAMBERTW")
lambertWFlag =
static_cast<int>(iter->getImmutableValue<
int>());
217 else if (tag ==
"ICFAC" )
icMultiplier = iter->getImmutableValue<
double>();
218 else if (tag ==
"MAXTIMESTEP" )
defaultMaxTimeStep = iter->getImmutableValue<
double>();
220 else if (tag ==
"VDSSCALEMIN" )
vdsScaleMin = iter->getImmutableValue<
double>();
221 else if (tag ==
"VGSTCONST" )
vgstConst = iter->getImmutableValue<
double>();
222 else if (tag ==
"NUMGAINSCALEBLOCKS" )
224 else if (tag ==
"STAGGERGAINSCALE")
226 else if (tag ==
"RANDOMIZEVGSTCONST")
228 else if (tag ==
"LENGTH0" )
length0 = iter->getImmutableValue<
double>();
229 else if (tag ==
"WIDTH0" )
width0 = iter->getImmutableValue<
double>();
230 else if (tag ==
"TOX0" )
tox0 = iter->getImmutableValue<
double>();
231 else if (tag ==
"MINRES" )
minRes = iter->getImmutableValue<
double>();
232 else if (tag ==
"MINCAP" )
minCap = iter->getImmutableValue<
double>();
233 else if (tag ==
"NEWMEYER" )
235 else if (tag ==
"SENSDEBUGLEVEL")
239 else if (tag ==
"DEBUGLEVEL")
241 debugLevel = (iter->getImmutableValue<
int>());
244 else if (tag ==
"VERBOSELEVEL")
248 else if (tag ==
"DEBUGMINTIMESTEP")
252 else if (tag ==
"DEBUGMAXTIMESTEP")
256 else if (tag ==
"DEBUGMINTIME")
260 else if (tag ==
"DEBUGMAXTIME")
264 else if (tag ==
"NEWEXCESSPHASE")
266 newExcessPhase =
static_cast<bool> (iter->getImmutableValue<
int>());
268 else if (tag ==
"EXCESSPHASESCALAR1")
272 else if (tag ==
"EXCESSPHASESCALAR2")
276 else if (tag ==
"ZERORESISTANCETOL")
280 else if (tag ==
"CHECKFORZERORESISTANCE")
284 else if (tag ==
"RANDOMSEED" )
286 randomSeed = (iter->getImmutableValue<
long>());
288 else if (tag ==
"TRYTOCOMPACT")
290 tryToCompact =
static_cast<bool> (iter->getImmutableValue<
int>());
292 else if (tag ==
"CALCULATEALLLEADCURRENTS")
298 Report::UserError0() << tag <<
" is not a recognized device package option.";
306 dout() << *
this << std::endl;
372 if( cp.getArgumentValue(
"-dva" ) ==
"off" )
374 lout() <<
"Warning: -dva is no longer a recognized option.\n" << std::endl;
377 if( cp.getArgumentValue(
"-dma" ) ==
"off" )
379 lout() <<
"Warning: -dma is no longer a recognized option.\n" << std::endl;
398 if ( cp.argExists(
"-sdl" ) )
403 if ( cp.argExists(
"-ddl" ) )
405 debugLevel = atoi( cp.getArgumentValue(
"-ddl" ).c_str() );
409 if (cp.argExists(
"-jacobian_test"))
496 os <<
"\n\n-----------------------------------------" << std::endl;
497 os <<
"\tDevice Options:\n";
498 os <<
"\t\tdefad = " << devOp.
defad <<
"\n";
499 os <<
"\t\tdefas = " << devOp.
defas <<
"\n";
500 os <<
"\t\tdefl = " << devOp.
defl <<
"\n";
501 os <<
"\t\tdefw = " << devOp.
defw <<
"\n";
502 os <<
"\t\tabstol = " << devOp.
abstol <<
"\n";
503 os <<
"\t\treltol = " << devOp.
reltol <<
"\n";
504 os <<
"\t\tchgtol = " << devOp.
chgtol <<
"\n";
505 os <<
"\t\tgmin = " << devOp.
gmin <<
"\n";
506 os <<
"\t\tgmin_orig = " << devOp.
gmin_orig <<
"\n";
507 os <<
"\t\tgmin_init = " << devOp.
gmin_init <<
"\n";
508 os <<
"\t\tgmin_scalar = " << devOp.
gmin_scalar <<
"\n";
509 os <<
"\t\tgmax = " << devOp.
gmax <<
"\n";
510 os <<
"\t\ttnom = " << devOp.
tnom <<
"\n";
511 os <<
"\t\tscale_src = " << devOp.
scale_src <<
"\n";
516 os <<
"\t\ttestJacWarn = " << devOp.
testJacWarn <<
"\n";
525 os <<
"\t\tlambertWFlag = " << devOp.
lambertWFlag <<
"\n";
526 os <<
"\t\ticMultiplier = " << devOp.
icMultiplier <<
"\n";
528 os <<
"\t\tvdsScaleMin = " << devOp.
vdsScaleMin <<
"\n";
529 os <<
"\t\tvgstConst = " << devOp.
vgstConst <<
"\n";
533 os <<
"\t\tlength0 = " << devOp.
length0 <<
"\n";
534 os <<
"\t\twidth0 = " << devOp.
width0 <<
"\n";
535 os <<
"\t\ttox0 = " << devOp.
tox0 <<
"\n";
536 os <<
"\t\tminres = " << devOp.
minRes <<
"\n";
537 os <<
"\t\tmincap = " << devOp.
minCap <<
"\n";
539 os <<
"\t\tdebugLevel = " << devOp.
debugLevel <<
"\n";
542 os <<
"\t\tdebugMinTime = " << devOp.
debugMinTime <<
"\n";
543 os <<
"\t\tdebugMaxTime = " << devOp.
debugMaxTime <<
"\n";
544 os <<
"\t\tverboseLevel = " << devOp.
verboseLevel <<
"\n";
550 os <<
"\t\tnewMeyerFlag = " << devOp.
newMeyerFlag <<
"\n";
551 os << Xyce::section_divider;