F
fogh
Guest
Hi All,
Is it possible to use time directly in a variable definition. in other
words can a variable be an explicit function of time ?
I have a RLC model of a cristal (piezo) that uses a scaling of the
quality-factor "scaf", so that the quality factor is decreased by a
factor scaf but the resonnant frequency stays the same. The lower Q
makes simulation possible, but I would like to make at least one
simulation (preferably a pnoise) with scaf=1, and thus a very high-Q.
The values of R,L and C in the cristal model are dependant on scaf.
I would like to let scaf decrease from 100 to 1 as an explicit
expression of time, for instance with
parameter _tmp1=0.5*( abs(time-25us) + time-25us )
parameter _tmp2= 1 - _tmp1/200us
parameter _tmp3= 0.5*(abs(_tmp2)+_tmp2)
scaf= 1 + 99*_tmp3
This way the Q of the cristal would increase slowly while the
oscillation regime has settled in low-Q. The problem is that spectre
doesn t let me use the variable "time". I expected a problem with pss ,
but it is not even allowed in transient.
I guess I could do this in verilog-AMS or with controlled sources, but
that seems a bit heavy. Does anyone know a more straightforward workaround ?
Is it possible to use time directly in a variable definition. in other
words can a variable be an explicit function of time ?
I have a RLC model of a cristal (piezo) that uses a scaling of the
quality-factor "scaf", so that the quality factor is decreased by a
factor scaf but the resonnant frequency stays the same. The lower Q
makes simulation possible, but I would like to make at least one
simulation (preferably a pnoise) with scaf=1, and thus a very high-Q.
The values of R,L and C in the cristal model are dependant on scaf.
I would like to let scaf decrease from 100 to 1 as an explicit
expression of time, for instance with
parameter _tmp1=0.5*( abs(time-25us) + time-25us )
parameter _tmp2= 1 - _tmp1/200us
parameter _tmp3= 0.5*(abs(_tmp2)+_tmp2)
scaf= 1 + 99*_tmp3
This way the Q of the cristal would increase slowly while the
oscillation regime has settled in low-Q. The problem is that spectre
doesn t let me use the variable "time". I expected a problem with pss ,
but it is not even allowed in transient.
I guess I could do this in verilog-AMS or with controlled sources, but
that seems a bit heavy. Does anyone know a more straightforward workaround ?