Browse Source

prevent false outputs of @dev[param], when not defined in ac simulation

h_vogt 14 years ago
parent
commit
ca8e9b2d2d
  1. 2
      src/frontend/error.h
  2. 2
      src/spicelib/analysis/acan.c
  3. 7
      src/spicelib/devices/cktask.c

2
src/frontend/error.h

@ -6,6 +6,8 @@
#ifndef ERROR_H_INCLUDED #ifndef ERROR_H_INCLUDED
#define ERROR_H_INCLUDED #define ERROR_H_INCLUDED
#include "ngspice/defines.h"
void controlled_exit(int status); void controlled_exit(int status);
#endif #endif

2
src/spicelib/analysis/acan.c

@ -244,6 +244,8 @@ ACan(CKTcircuit *ckt, int restart)
INIT_STATS(); INIT_STATS();
ckt->CKTcurrentAnalysis = DOING_AC;
/* main loop through all scheduled frequencies */ /* main loop through all scheduled frequencies */
while (freq <= job->ACstopFreq + freqTol) { while (freq <= job->ACstopFreq + freqTol) {
if(SPfrontEnd->IFpauseTest()) { if(SPfrontEnd->IFpauseTest()) {

7
src/spicelib/devices/cktask.c

@ -7,12 +7,15 @@ Author: 1985 Thomas L. Quarles
* *
* Ask questions about a specified device. */ * Ask questions about a specified device. */
#include "ngspice/ngspice.h"
#include "ngspice/config.h" #include "ngspice/config.h"
#include "ngspice/devdefs.h" #include "ngspice/devdefs.h"
#include "ngspice/sperror.h" #include "ngspice/sperror.h"
#include "dev.h" #include "dev.h"
#include "error.h"
extern bool ft_stricterror;
int int
CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalue *selector) CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalue *selector)
@ -40,5 +43,9 @@ CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalu
length = sizeof(int); length = sizeof(int);
BRDCST_(&msgtype, (char *)&error, &length, &from); BRDCST_(&msgtype, (char *)&error, &length, &from);
#endif /* PARALLEL_ARCH */ #endif /* PARALLEL_ARCH */
if (ft_stricterror) {
fprintf(stderr, "\nError: %s\n", errMsg);
controlled_exit(EXIT_BAD);
}
return(error); return(error);
} }
Loading…
Cancel
Save