Guest
Hi, the spice 3 manual
(http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec3.html)
says this:
DC/TRAN is the dc and transient analysis value of the source. If the
source value is zero both for dc and transient analyses, this value may
be omitted. If the source value is time-invariant (e.g., a power
supply), then the value may optionally be preceded by the letters DC.
....
Any independent source can be assigned a time-dependent value for
transient analysis. If a source is assigned a time-dependent value, the
time-zero value is used for dc analysis.
But then it gives the following examples:
VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
I don't understand why they specify 0.001. The text says the time-zero
value of the sin() function will be used as the value for dc
simulation, so I'm wondering if the 0.001 is for something other than
the dc value. Or is the 0.001 used when *only* a dc bias point is
requested, but the sin() time-zero value is used for bias point when a
transient is requested elsewhere in the simulation? Which of these is
used as bias setup for AC sim?
Also, from the first paragraph, am I to infer that you may not use 'DC'
if the source is time-variant? I realize the logic doesn't say this
explicitly (modus ponens and all that), but I'm wondering anyway.
Also, can the dc transient definition be swapped in position with the
ac and distof1 definitions? Their example suggests yes, but it doesn't
quite conform to the canonical structure as listed in the definition of
vxxxx and ixxxx.
Why all this? I'm writing my own spice parser... for fun
BTW, other than the source code and user documentation, is there a
place where the spice syntax is defined more formally, such as
backus-naur form? That might answer some questions.
thanks
Michael
(http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/sec3.html)
says this:
DC/TRAN is the dc and transient analysis value of the source. If the
source value is zero both for dc and transient analyses, this value may
be omitted. If the source value is time-invariant (e.g., a power
supply), then the value may optionally be preceded by the letters DC.
....
Any independent source can be assigned a time-dependent value for
transient analysis. If a source is assigned a time-dependent value, the
time-zero value is used for dc analysis.
But then it gives the following examples:
VIN 13 2 0.001 AC 1 SIN(0 1 1MEG)
I don't understand why they specify 0.001. The text says the time-zero
value of the sin() function will be used as the value for dc
simulation, so I'm wondering if the 0.001 is for something other than
the dc value. Or is the 0.001 used when *only* a dc bias point is
requested, but the sin() time-zero value is used for bias point when a
transient is requested elsewhere in the simulation? Which of these is
used as bias setup for AC sim?
Also, from the first paragraph, am I to infer that you may not use 'DC'
if the source is time-variant? I realize the logic doesn't say this
explicitly (modus ponens and all that), but I'm wondering anyway.
Also, can the dc transient definition be swapped in position with the
ac and distof1 definitions? Their example suggests yes, but it doesn't
quite conform to the canonical structure as listed in the definition of
vxxxx and ixxxx.
Why all this? I'm writing my own spice parser... for fun
BTW, other than the source code and user documentation, is there a
place where the spice syntax is defined more formally, such as
backus-naur form? That might answer some questions.
thanks
Michael