Patch sent by Hitoshi to fix ltra code and "listing" command. See Changelog.
This commit is contained in:
parent
847173ecc0
commit
33b254609b
21
ChangeLog
21
ChangeLog
|
|
@ -1,3 +1,24 @@
|
||||||
|
2005-09-04 Paolo Nenzi <p.nenzi@ieee.org>
|
||||||
|
|
||||||
|
* src/spicelib/devices/ltra/{ltraload.c, ltraacld.c, ltratrun.c}:
|
||||||
|
Applied Hitoshi's patches to fix ltra code. The bug produced a
|
||||||
|
"Timestep too small" in simulations and uninitialized variables
|
||||||
|
produced wrong results in some files under MinGW.
|
||||||
|
|
||||||
|
* src/spicelib/parser/inp2d.c:
|
||||||
|
Fixed a bug that causes an "unknown parameter(save)" error if there
|
||||||
|
is the expression like the following in the netlist of Cider analysis.
|
||||||
|
|
||||||
|
D1 1 2 M_PN AREA=100 save
|
||||||
|
(Fix from Hitoshi Tanaka).
|
||||||
|
|
||||||
|
* src/frontend/streams.c:
|
||||||
|
Fix to a bug that caused crush when I input "listing" command after
|
||||||
|
loading Cider examples under Ngspice compiled by Visual C++.
|
||||||
|
(Fix from Hitoshi Tanaka).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
2005-08-30 Paolo Nenzi <p.nenzi@ieee.org>
|
2005-08-30 Paolo Nenzi <p.nenzi@ieee.org>
|
||||||
|
|
||||||
============================ Rework-17 ==================================
|
============================ Rework-17 ==================================
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,9 @@ char cp_gt = '>';
|
||||||
char cp_lt = '<';
|
char cp_lt = '<';
|
||||||
char cp_amp = '&';
|
char cp_amp = '&';
|
||||||
|
|
||||||
FILE *cp_in;
|
FILE *cp_in = NULL;
|
||||||
FILE *cp_out;
|
FILE *cp_out = NULL;
|
||||||
FILE *cp_err;
|
FILE *cp_err = NULL;
|
||||||
|
|
||||||
/* These are the fps that cp_ioreset resets the cp_* to. They are
|
/* These are the fps that cp_ioreset resets the cp_* to. They are
|
||||||
* changed by the source routines. */
|
* changed by the source routines. */
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@ LTRAacLoad(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
|
|
||||||
y0_r = model->LTRAadmit;
|
y0_r = model->LTRAadmit;
|
||||||
y0_i = 0.0;
|
y0_i = 0.0;
|
||||||
lambda_i = model->LTRAtd * ckt->CKTomega;
|
/*lambda_i = model->LTRAtd*ckt->CKTomega;*/
|
||||||
|
lambda_i = sqrt(model->LTRAinduct*model->LTRAcapac) * ckt->CKTomega; /*CDHW*/
|
||||||
lambda_r = 0.0;
|
lambda_r = 0.0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,11 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
{
|
{
|
||||||
LTRAmodel *model = (LTRAmodel *) inModel;
|
LTRAmodel *model = (LTRAmodel *) inModel;
|
||||||
LTRAinstance *here;
|
LTRAinstance *here;
|
||||||
double t1, t2, t3;
|
double t1=0.0, t2=0.0, t3=0.0;
|
||||||
double qf1, qf2, qf3;
|
double qf1=0.0, qf2=0.0, qf3=0.0;
|
||||||
double lf2, lf3;
|
double lf2, lf3;
|
||||||
double v1d = 0.0, v2d = 0.0, i1d = 0.0, i2d = 0.0;
|
double v1d = 0.0, v2d = 0.0, i1d = 0.0, i2d = 0.0;
|
||||||
double dummy1, dummy2;
|
double dummy1=0.0, dummy2=0.0;
|
||||||
int isaved = 0;
|
int isaved = 0;
|
||||||
unsigned tdover = 0;
|
unsigned tdover = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
@ -144,13 +144,16 @@ LTRAload(GENmodel *inModel, CKTcircuit *ckt)
|
||||||
if (i == ckt->CKTtimeIndex)
|
if (i == ckt->CKTtimeIndex)
|
||||||
i--;
|
i--;
|
||||||
|
|
||||||
#ifdef LTRADEBUG
|
/*#ifdef LTRADEBUG*/
|
||||||
if ((i == -1)) {
|
if ((i == -1)) {
|
||||||
|
#ifdef LTRADEBUG
|
||||||
printf("LTRAload: mistake: cannot find delayed timepoint\n");
|
printf("LTRAload: mistake: cannot find delayed timepoint\n");
|
||||||
}
|
return E_INTERN;
|
||||||
|
/*}*/
|
||||||
#else
|
#else
|
||||||
return E_INTERN;
|
return E_INTERN;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
isaved = i;
|
isaved = i;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ LTRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep)
|
||||||
double i5, i6, d1, d2, d3, d4;
|
double i5, i6, d1, d2, d3, d4;
|
||||||
double tmp;
|
double tmp;
|
||||||
double tolerance;
|
double tolerance;
|
||||||
double current_lte;
|
double current_lte=0.0;
|
||||||
int maxiter = 2, iterations = 0;
|
int maxiter = 2, iterations = 0;
|
||||||
double x, y, change, deriv, deriv_delta;
|
double x, y, change, deriv, deriv_delta;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue