Remove the XSPICE limitation of flag "current" (here->ISRCcurrent)
This commit is contained in:
parent
d6b4184625
commit
fc6f41ae9b
|
|
@ -38,11 +38,7 @@ IFparm ISRCpTable[] = { /* parameters */
|
|||
IP ("ac", ISRC_AC, IF_REALVEC,"AC magnitude, phase vector"),
|
||||
OP ("v", ISRC_VOLTS, IF_REAL, "Voltage across the supply"),
|
||||
OP ("p", ISRC_POWER, IF_REAL, "Power supplied by the source"),
|
||||
/* gtri - begin - add parameter for current source value */
|
||||
#ifdef XSPICE
|
||||
OP ("current", ISRC_CURRENT, IF_REAL, "Current in DC or Transient mode"),
|
||||
#endif
|
||||
/* gtri - end - add parameter for current source value */
|
||||
IP ("distof1", ISRC_D_F1, IF_REALVEC,"f1 input for distortion"),
|
||||
IP ("distof2", ISRC_D_F2, IF_REALVEC,"f2 input for distortion")
|
||||
};
|
||||
|
|
|
|||
|
|
@ -92,13 +92,9 @@ ISRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *
|
|||
*(ckt->CKTrhsOld + here->ISRCnegNode));
|
||||
}
|
||||
return(OK);
|
||||
/* gtri - begin - add current value information */
|
||||
#ifdef XSPICE
|
||||
case ISRC_CURRENT:
|
||||
value->rValue = here->ISRCcurrent;
|
||||
return (OK);
|
||||
#endif
|
||||
/* gtri - end - add current value information */
|
||||
#ifdef SHARED_MODULE
|
||||
case ISRC_EXTERNAL:
|
||||
/* Don't do anything */
|
||||
|
|
|
|||
|
|
@ -51,12 +51,8 @@ typedef struct sISRCinstance {
|
|||
struct trnoise_state *ISRCtrnoise_state; /* transient noise */
|
||||
struct trrandom_state *ISRCtrrandom_state; /* transient random source */
|
||||
|
||||
/* gtri - begin - add member to hold current source value */
|
||||
#ifdef XSPICE
|
||||
/* needed for outputting results */
|
||||
double ISRCcurrent; /* current value */
|
||||
#endif
|
||||
/* gtri - end - add member to hold current source value */
|
||||
|
||||
unsigned ISRCdcGiven :1 ; /* flag to indicate dc value given */
|
||||
unsigned ISRCmGiven :1 ; /* flag to indicate multiplier given */
|
||||
|
|
|
|||
|
|
@ -409,11 +409,7 @@ loadDone:
|
|||
|
||||
/* gtri - end - wbk - modify to process srcFact, etc. for all sources */
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - record value so it can be output if requested */
|
||||
here->ISRCcurrent = m * value;
|
||||
/* gtri - end - wbk - record value so it can be output if requested */
|
||||
#endif
|
||||
} // for loop instances
|
||||
} // for loop models
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue