Vijay, It rather depends on what you want to vary and what the condition is. If it's a simple event - when something reaches a limit you want to change the pulse width - then you can do that in SPECTRE17.1 using something like this: parameters pulsewid=20n Vramp (ramp 0) vsource type=pulse val0=0 val1=2 rise=1u whenHigh assert expr=V(ramp) min=0 max=1.2 Vpulse (outpulse 0) vsource type=pulse val0=0 val1=1 period=100n width=pulsewid rise=1n fall=1n tran tran stop=1u param=pulsewid param_vec=[0 20n @whenHigh 70n] This means that the parameter pulsewid will change when the assert whenHigh fires. It only happens the first time - and the value you change it to is fixed. You can do all this from the ADE UI (I purposefully didn't use the dev=Vpulse on the tran line to vary the instance parameter width on the pulse source because you'd have to add the Additional parameter dev=Vpulse on the tran options form to do this as it doesn't appear on the UI; so instead I use a design variable to control the pulse width). I suspect you want the pulse width to be more continuously variable (e.g. some kind of PWM waveform). In which case, you'd need to write a Verilog-A model for the pulse generator - that would be the easiest way by far. Regards, Andrew.
↧