dc sweep fails after transient sim:

keep MODEDCTRANCURVE as provided by commit
7d8236766 ("b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep", 2012-10-03)
Instead exclude current integration when MODEDCTRANCURVE is selected.
Unify setting ChargeComputationNeeded in b4vdld.c,
make it as in other b4xxld.c.
This commit is contained in:
Holger Vogt 2022-06-06 16:27:06 +02:00
parent 838ad2b10c
commit e5c162f126
5 changed files with 21 additions and 2 deletions

View File

@ -2812,6 +2812,10 @@ line755:
if (!ChargeComputationNeeded)
goto line850;
/* no integration, if dc sweep, but keep evaluating capacitances */
if (ckt->CKTmode & MODEDCTRANCURVE)
goto line850;
if (ckt->CKTmode & MODEINITTRAN)
{ *(ckt->CKTstate1 + here->BSIM3qb) =
*(ckt->CKTstate0 + here->BSIM3qb);

View File

@ -3125,6 +3125,10 @@ line755:
if (!ChargeComputationNeeded)
goto line850;
/* no integration, if dc sweep, but keep evaluating capacitances */
if (ckt->CKTmode & MODEDCTRANCURVE)
goto line850;
if (ckt->CKTmode & MODEINITTRAN)
{ *(ckt->CKTstate1 + here->BSIM3v32qb) =
*(ckt->CKTstate0 + here->BSIM3v32qb);

View File

@ -4614,6 +4614,10 @@ line755:
if (!ChargeComputationNeeded)
goto line850;
/* no integration, if dc sweep, but keep evaluating capacitances */
if (ckt->CKTmode & MODEDCTRANCURVE)
goto line850;
if (ckt->CKTmode & MODEINITTRAN)
{ *(ckt->CKTstate1 + here->BSIM4qb) =
*(ckt->CKTstate0 + here->BSIM4qb);

View File

@ -231,10 +231,9 @@ int ByPass, ChargeComputationNeeded, error, Check, Check1, Check2;
ScalingFactor = 1.0e-9;
ChargeComputationNeeded =
((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) ||
((ckt->CKTmode & (MODEDCTRANCURVE | MODEAC | MODETRAN | MODEINITSMSIG)) ||
((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)))
? 1 : 0;
ChargeComputationNeeded = 1;
#ifndef USE_OMP
for (; model != NULL; model = BSIM4v5nextModel(model))
@ -4188,6 +4187,10 @@ line755:
if (!ChargeComputationNeeded)
goto line850;
/* no integration, if dc sweep, but keep evaluating capacitances */
if (ckt->CKTmode & MODEDCTRANCURVE)
goto line850;
if (ckt->CKTmode & MODEINITTRAN)
{ *(ckt->CKTstate1 + here->BSIM4v5qb) =
*(ckt->CKTstate0 + here->BSIM4v5qb);

View File

@ -4523,6 +4523,10 @@ line755:
if (!ChargeComputationNeeded)
goto line850;
/* no integration, if dc sweep, but keep evaluating capacitances */
if (ckt->CKTmode & MODEDCTRANCURVE)
goto line850;
if (ckt->CKTmode & MODEINITTRAN)
{ *(ckt->CKTstate1 + here->BSIM4v7qb) =
*(ckt->CKTstate0 + here->BSIM4v7qb);