• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Mixed-Signal Design
  3. stop & restart clock

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 64
  • Views 6944
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stop & restart clock

Charanraj Mohan
Charanraj Mohan over 8 years ago

Hi,

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.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    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

    parameters clkFreq=1M

    clk50 pattern data="10" rpttimes=49 // means 50 total
    off20 pattern data="00" rpttimes=19 // means 20 total
    clk17 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!

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    thank you so much Andrew.
    Another way I tried is - with a simple AND gate with 2 inputs. 1 input with clock and the other with a pwl signal keeping high where the clock is needed and low where the clock is not needed. It also works.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago
    You could also use a pvcvs2 (or pvcvsp) for this from analogLib - this is a polynomial voltage controlled voltage source. Or you could use (and this is probably easier to use) vcvsp with the number of controlling sources set to 2, and the Type of source set to "and".
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    Thanks Andrew. I am going to use this, as it is the simplest one. Also am wondering if there is a way to re-start clock with different pulse width, but keeping rise and fall time same. For example- have a clock for 1us pulse width & 2 us period for first 10 cycles, then stop the clock for some time. After this re-start the clock for 2u pulse width & 4 us period for 10 cycles. Is this possible by pvcvsp ??
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    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.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Charanraj Mohan
    Charanraj Mohan over 8 years ago
    Thanks Andrew :)
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information