Just a question. Can b silly. How to stop the clock and start again in a transient time ?? Say, the whole clock time has same period, pulse width, tr, tf, td. I can do it in Vpwl, but the clock I am planning has more cycles :(
Thanks in advance.
One way would be to use a bit source (so use source from analogLib and set the type to be "bit"). You can then either define a sequence of 1 and 0 values, along with the values these correspond to, rise times, periods and so on, or you can reference a "pattern" which could be defined in an include file. See "spectre -h pattern" and "spectre -h vsource". The pattern allows nested patterns with repetitions - so you could define a fairly complex sequence simply:
// example of using pattern to simply define a clock pulse that// is enabled for 50 periods, then off for 20 periods, then on for another// 17 periods
clk50 pattern data="10" rpttimes=49 // means 50 totaloff20 pattern data="00" rpttimes=19 // means 20 totalclk17 pattern data="10" rpttimes=16 // means 17 total
vclk (clk 0) vsource type=bit data="00,clk50,off20,clk17,0000" val0=0 \ val1=1.8 rise=.1n fall=0.1n period=1/(clkFreq*2)
tran tran stop=(50+20+17+3)*1/clkFreq
Here's what it ends up looking like:
Hope that helps!
In reply to Andrew Beckett:
In reply to Charanraj Mohan:
Yes - you could have four inputs - one with each of the two clock frequencies, and then an enabling signal for each which would multiply the corresponding input. The coefficients will get a little complex with pvcvsp because you don't care about the higher order terms, but it's doable.
Simpler would probably just be to use two vcvsp in AND mode (as described above) with the outputs connected in series. Then you'll get the sum of the enabled two clock frequencies - assuming you only have one enabled at a time, that would do exactly what you want.
Or you could use the bit source with a pattern which was of the form 1100 for the second part of the waveform.
As always, there are many ways you can solve this kind of problem.