PULSE: correct timing in case of phase != 0
This commit is contained in:
parent
8ba1e81a9b
commit
413d0ff103
|
|
@ -1,6 +1,5 @@
|
|||
2010-11-20
|
||||
* vsracct.c: allow time < 0.0 if no XSPICE A device
|
||||
FIXME has to be investigated further!
|
||||
2010-11-20 Holger Vogt
|
||||
* vsracct.c: correct timing in case of phase != 0
|
||||
|
||||
2010-11-19 Robert Larice
|
||||
* */** :
|
||||
|
|
|
|||
|
|
@ -68,18 +68,11 @@ VSRCaccept(CKTcircuit *ckt, GENmodel *inModel)
|
|||
&& here->VSRCcoeffs[6] != 0.0
|
||||
? here->VSRCcoeffs[6] : ckt->CKTfinalTime;
|
||||
#ifdef XSPICE
|
||||
PHASE = here->VSRCfunctionOrder > 8
|
||||
PHASE = here->VSRCfunctionOrder > 7
|
||||
? here->VSRCcoeffs[7] : 0.0;
|
||||
#endif
|
||||
/* offset time by delay and limit to zero */
|
||||
time = ckt->CKTtime - TD;
|
||||
#ifdef XSPICE
|
||||
/* FIXME Why is this here?
|
||||
For now: Add it only if A devices are present.
|
||||
h_vogt */
|
||||
if ((ckt->CKTadevFlag == 1) && (time < 0.0))
|
||||
time = 0.0;
|
||||
#endif
|
||||
|
||||
#ifdef XSPICE
|
||||
/* normalize phase to 0 - 2PI */
|
||||
|
|
@ -89,11 +82,10 @@ VSRCaccept(CKTcircuit *ckt, GENmodel *inModel)
|
|||
|
||||
/* compute equivalent delta time and add to time */
|
||||
deltat = (phase / (2 * M_PI)) * PER;
|
||||
time += deltat;
|
||||
time += deltat;
|
||||
TD -= deltat;
|
||||
#endif
|
||||
/* gtri - end - wbk - add PHASE parameter */
|
||||
|
||||
|
||||
|
||||
if(time >= PER) {
|
||||
/* repeating signal - figure out where we are */
|
||||
|
|
|
|||
Loading…
Reference in New Issue