comments
This commit is contained in:
parent
9e2f02fbe2
commit
af4e5ebcdc
|
|
@ -220,10 +220,8 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
startcTime = ckt->CKTstat->STATcombineTime;
|
startcTime = ckt->CKTstat->STATcombineTime;
|
||||||
startkTime = ckt->CKTstat->STATsyncTime;
|
startkTime = ckt->CKTstat->STATsyncTime;
|
||||||
|
|
||||||
|
|
||||||
/* main loop through all scheduled frequencies */
|
/* main loop through all scheduled frequencies */
|
||||||
while(freq <= ((ACAN*)ckt->CKTcurJob)->ACstopFreq+freqTol) {
|
while(freq <= ((ACAN*)ckt->CKTcurJob)->ACstopFreq+freqTol) {
|
||||||
|
|
||||||
if( (*(SPfrontEnd->IFpauseTest))() ) {
|
if( (*(SPfrontEnd->IFpauseTest))() ) {
|
||||||
/* user asked us to pause via an interrupt */
|
/* user asked us to pause via an interrupt */
|
||||||
((ACAN*)ckt->CKTcurJob)->ACsaveFreq = freq;
|
((ACAN*)ckt->CKTcurJob)->ACsaveFreq = freq;
|
||||||
|
|
@ -231,63 +229,55 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
}
|
}
|
||||||
ckt->CKTomega = 2.0 * M_PI *freq;
|
ckt->CKTomega = 2.0 * M_PI *freq;
|
||||||
|
|
||||||
|
/* Update opertating point, if variable 'hertz' is given */
|
||||||
|
|
||||||
|
|
||||||
#define NEWOP
|
|
||||||
#ifdef NEWOP
|
|
||||||
/* this is a test! Update opertating point, if variable 'hertz' is given */
|
|
||||||
if (ckt->CKTmode & MODEINITHERTZ) {
|
if (ckt->CKTmode & MODEINITHERTZ) {
|
||||||
#ifdef XSPICE
|
#ifdef XSPICE
|
||||||
/* Call EVTop if event-driven instances exist */
|
/* Call EVTop if event-driven instances exist */
|
||||||
|
|
||||||
if(ckt->evt->counts.num_insts != 0) {
|
if(ckt->evt->counts.num_insts != 0) {
|
||||||
error = EVTop(ckt,
|
error = EVTop(ckt,
|
||||||
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT,
|
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT,
|
||||||
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT,
|
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT,
|
||||||
ckt->CKTdcMaxIter,
|
ckt->CKTdcMaxIter,
|
||||||
MIF_TRUE);
|
MIF_TRUE);
|
||||||
EVTdump(ckt, IPC_ANAL_DCOP, 0.0);
|
EVTdump(ckt, IPC_ANAL_DCOP, 0.0);
|
||||||
EVTop_save(ckt, MIF_TRUE, 0.0);
|
EVTop_save(ckt, MIF_TRUE, 0.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
// If no event-driven instances, do what SPICE normally does
|
// If no event-driven instances, do what SPICE normally does
|
||||||
error = CKTop(ckt,
|
error = CKTop(ckt,
|
||||||
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT,
|
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT,
|
||||||
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT,
|
(ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT,
|
||||||
ckt->CKTdcMaxIter);
|
ckt->CKTdcMaxIter);
|
||||||
|
|
||||||
if(error){
|
if(error){
|
||||||
fprintf(stdout,"\nAC operating point failed -\n");
|
fprintf(stdout,"\nAC operating point failed -\n");
|
||||||
CKTncDump(ckt);
|
CKTncDump(ckt);
|
||||||
return(error);
|
return(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG;
|
ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG;
|
||||||
error = CKTload(ckt);
|
error = CKTload(ckt);
|
||||||
if(error) return(error);
|
if(error) return(error);
|
||||||
|
|
||||||
/* end of test */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODEAC;
|
ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODEAC;
|
||||||
error = NIacIter(ckt);
|
error = NIacIter(ckt);
|
||||||
if (error) {
|
if (error) {
|
||||||
ckt->CKTcurrentAnalysis = DOING_AC;
|
ckt->CKTcurrentAnalysis = DOING_AC;
|
||||||
ckt->CKTstat->STATacTime += SPfrontEnd->IFseconds() - startTime;
|
ckt->CKTstat->STATacTime += SPfrontEnd->IFseconds() - startTime;
|
||||||
ckt->CKTstat->STATacDecompTime += ckt->CKTstat->STATdecompTime -
|
ckt->CKTstat->STATacDecompTime += ckt->CKTstat->STATdecompTime -
|
||||||
startdTime;
|
startdTime;
|
||||||
ckt->CKTstat->STATacSolveTime += ckt->CKTstat->STATsolveTime -
|
ckt->CKTstat->STATacSolveTime += ckt->CKTstat->STATsolveTime -
|
||||||
startsTime;
|
startsTime;
|
||||||
ckt->CKTstat->STATacLoadTime += ckt->CKTstat->STATloadTime -
|
ckt->CKTstat->STATacLoadTime += ckt->CKTstat->STATloadTime -
|
||||||
startlTime;
|
startlTime;
|
||||||
ckt->CKTstat->STATacCombTime += ckt->CKTstat->STATcombineTime -
|
ckt->CKTstat->STATacCombTime += ckt->CKTstat->STATcombineTime -
|
||||||
startcTime;
|
startcTime;
|
||||||
ckt->CKTstat->STATacSyncTime += ckt->CKTstat->STATsyncTime -
|
ckt->CKTstat->STATacSyncTime += ckt->CKTstat->STATsyncTime -
|
||||||
startkTime;
|
startkTime;
|
||||||
return(error);
|
return(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WANT_SENSE2
|
#ifdef WANT_SENSE2
|
||||||
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&ACSEN) ){
|
if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&ACSEN) ){
|
||||||
|
|
@ -347,18 +337,17 @@ ACan(CKTcircuit *ckt, int restart)
|
||||||
|
|
||||||
/* inserted again 14.12.2001 */
|
/* inserted again 14.12.2001 */
|
||||||
#ifdef HAS_WINDOWS
|
#ifdef HAS_WINDOWS
|
||||||
{
|
{
|
||||||
double endfreq = ((ACAN*)ckt->CKTcurJob)->ACstopFreq;
|
double endfreq = ((ACAN*)ckt->CKTcurJob)->ACstopFreq;
|
||||||
double startfreq = ((ACAN*)ckt->CKTcurJob)->ACstartFreq;
|
double startfreq = ((ACAN*)ckt->CKTcurJob)->ACstartFreq;
|
||||||
/* double step = ((ACAN*)ckt->CKTcurJob)->ACfreqDelta; */
|
endfreq = log(endfreq);
|
||||||
endfreq = log(endfreq);
|
if (startfreq == 0.0)
|
||||||
if (startfreq == 0.0)
|
startfreq = 1e-12;
|
||||||
startfreq = 1e-12;
|
startfreq = log(startfreq);
|
||||||
startfreq = log(startfreq);
|
|
||||||
|
|
||||||
if (freq > 0.0)
|
if (freq > 0.0)
|
||||||
SetAnalyse( "ac", (log(freq)-startfreq) * 1000.0 / (endfreq-startfreq));
|
SetAnalyse( "ac", (log(freq)-startfreq) * 1000.0 / (endfreq-startfreq));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
freq *= ((ACAN*)ckt->CKTcurJob)->ACfreqDelta;
|
freq *= ((ACAN*)ckt->CKTcurJob)->ACfreqDelta;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue