If 'set ngdebug', and if transient simulation,
create a vector speedcheck in the tran plot which contains the real time versus simulated time, to check for obstacles during the course of the transient simulation. If command 'save' is given, one has to add speedcheck to obtain this vector.
This commit is contained in:
parent
65cb50a243
commit
2a2a488f7d
|
|
@ -255,6 +255,13 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam
|
|||
saves[i].used = 1;
|
||||
break;
|
||||
}
|
||||
/* generate a vector of real time information */
|
||||
else if (ft_ngdebug && eq(refName, "time") && eq(saves[i].name, "speedcheck")) {
|
||||
addDataDesc(run, "speedcheck", IF_REAL, j, initmem);
|
||||
savesused[i] = TRUE;
|
||||
saves[i].used = 1;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < numNames; i++)
|
||||
if (!refName || !name_eq(dataNames[i], refName))
|
||||
|
|
@ -268,6 +275,10 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam
|
|||
{
|
||||
addDataDesc(run, dataNames[i], dataType, i, initmem);
|
||||
}
|
||||
/* generate a vector of real time information */
|
||||
if (ft_ngdebug && eq(refName, "time")) {
|
||||
addDataDesc(run, "speedcheck", IF_REAL, numNames, initmem);
|
||||
}
|
||||
}
|
||||
|
||||
/* Pass 1 and a bit.
|
||||
|
|
@ -422,6 +433,7 @@ beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analNam
|
|||
sh_vecinit(run);
|
||||
#endif
|
||||
|
||||
lastclock = clock();
|
||||
return (OK);
|
||||
}
|
||||
|
||||
|
|
@ -532,7 +544,13 @@ OUTpD_memory(runDesc *run, IFvalue *refValue, IFvalue *valuePtr)
|
|||
else if (d->type == IF_COMPLEX)
|
||||
plotAddComplexValue(d, refValue->cValue);
|
||||
} else if (d->regular) {
|
||||
if (d->type == IF_REAL)
|
||||
if (ft_ngdebug && d->type == IF_REAL && eq(d->name, "speedcheck")) {
|
||||
/* current time */
|
||||
clock_t cl = clock();
|
||||
double tt = ((double)cl - (double)lastclock) / CLOCKS_PER_SEC;
|
||||
plotAddRealValue(d, tt);
|
||||
}
|
||||
else if (d->type == IF_REAL)
|
||||
plotAddRealValue(d, valuePtr->v.vec.rVec[d->outIndex]);
|
||||
else if (d->type == IF_COMPLEX)
|
||||
plotAddComplexValue(d, valuePtr->v.vec.cVec[d->outIndex]);
|
||||
|
|
@ -905,6 +923,8 @@ guess_type(const char *name)
|
|||
type = SV_CURRENT;
|
||||
else if (cieq(name, "time"))
|
||||
type = SV_TIME;
|
||||
else if ( cieq(name, "speedcheck"))
|
||||
type = SV_TIME;
|
||||
else if (cieq(name, "frequency"))
|
||||
type = SV_FREQUENCY;
|
||||
else if (ciprefix("inoise", name))
|
||||
|
|
|
|||
|
|
@ -229,13 +229,6 @@ SetAnalyse(char *Analyse, /* in: analysis type */
|
|||
ftime(&timenow);
|
||||
timediff(&timenow, &timebefore, &diffsec, &diffmillisec);
|
||||
|
||||
/* info every one percent of progress:
|
||||
actual time, progress,
|
||||
to catch linearity of progress of simulation */
|
||||
if (ft_ngdebug && !strcmp(Analyse, "tran"))
|
||||
if ((int)((double)DecaPercent/10.) > (int)((double)OldPercent/10.))
|
||||
win_x_printf("%3.1f%% percent progress after %4.2f seconds.\n", (double)DecaPercent/10., seconds());
|
||||
|
||||
OldPercent = DecaPercent;
|
||||
/* output only into hwAnalyse window and if time elapsed is larger than
|
||||
DELTATIME given value, or if analysis has changed, else return */
|
||||
|
|
|
|||
Loading…
Reference in New Issue