• 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. Custom IC Design
  3. Controlling maxstep during tstab in Harmonic Balance

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 125
  • Views 12348
  • 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

Controlling maxstep during tstab in Harmonic Balance

Raghu Rao
Raghu Rao over 4 years ago

Hello,

Spectre seems to set the maxstep for hb (during tstab) to be 1/100th the time period of Tone-1 by default, even if the maxstep specified is much larger. I couldn't find prior discussion/bugs on this behavior. Can anyone please let me know if this is expected?

In my example case, spectre seems to set maxstep to 3.85ps even when I ask it to set it to 100p. The period of tone-1 is 385ps and spectre seems to pick maxstep to be 1/100th that. I changed oversampling factor for curiosity - doesn't seem to make a difference.

I've attached input.scs and spectre.out for reference. Below are brief details from there. Please let me know if I'm missing something! Thanks a bunch for the help.

Raghu

Spectre Version: 18.1.0.235.isr3 64bit -- 8 Jan 2019 (APS enabled)

From input.scs:

hb hb tstab=1.05u saveinit=yes oversample=[2 1 1]
+ fundfreqs=[(f_lo) (par_frf1) (par_frf2)] maxharms=[10 5 5]
+ errpreset=moderate maxstep=100p tstabmethod=gear2only skipdc=yes
+ annotate=status

parameters par_frf1=2.6G par_frf2=2.601G f_lo=2.595G

From spectre.out:

Important parameter values in tstab integration:
start = 0 s
outputstart = 0 s
stop = 1.0501 us
step = 1.0501 ns
maxstep = 3.85356 ps
ic = all
useprevic = no
skipdc = yes
reltol = 10e-06
abstol(V) = 1 uV
abstol(I) = 1 pA
temp = 27 C
tnom = 25 C
tempeffects = all
method = gear2only
lteratio = 3.5
relref = sigglobal
cmin = 0 F
gmin = 1 pS
rabsshort = 1 mOhm

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    I did a bit of checking, and then found an internal discussion about this. With a single tone, maxstep is constrained to be a 25th of the fundamental period - you can't set it smaller. For multi-tone it appears to be (as you said) 100th of the first tone's period - you can set it smaller, but not larger.

    Now why would this be? Well, one of the key reasons for the tstab is to generate a good, accurate starting point for the harmonic balance algorithm Realistically you're going to have a fair number of points in the period for that to be useful - so setting it to 100ps (and I appreciate that may have just been an experiment) would only give you fewer than 4 points per period - so that's not going to be anywhere near enough to usefully perform a Fourier analysis to start the harmonic balance from. If you're asking for 10 harmonics of the first tone then at least 20 points would make sense (I should note that the number of harmonics does not affect this maxstep setting during the tstab though).

    So put simply, the choice has been made as a practical decision to ensure a good start to the harmonic balance analysis itself. I can understand why you might want to speed up the tstab, but it then becomes significantly less valueable for the conditioning of the hb algorithm. Note that the tstab is only simulating with the first tone enabled, by the way.

    A couple of further points:

    1. Setting skipdc=yes seems a pretty bad idea to me - usually you'd only do that if either you're starting with an initial conditions file, or have your sources ramping up somehow (hard to do with hb).
    2. oversample wouldn't affect the tstab anyway - what that does is add more sample points during the hb interval - it increases the number of points that it converts back into the time domain (via an IFFT), simulates in the time domain at those sampled time points, and then converts back again. This is normally used to increase accuracy when you have switching circuits or square(ish) signals.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Raghu Rao
    Raghu Rao over 4 years ago in reply to Andrew Beckett

    Thanks for the quick reply, Andrew! And for the pointers - they're helpful too.

    I get where you're coming from - why tstab should help condition the hb algorithm correctly. The reasons you suggested make complete sense for cases when tstab is required to stabilize transient effects from enabling Tone-1. 

    But, often if not always, tstab is also needed for circuit ramp-up (supply ramp-up due to start-up issues for eg., as in my case). These transients can take several thousand periods of Tone-1 to settle. Since the settling behavior is slow, we can normally increase the transient step sizes comparable to or larger than one Tone-1 period without compromising on accuracy. While running transient analysis, we exploit this by disabling the source for tone-1 (and other tones) during circuit ramp-up and setting maxstep to a corresponding value that is often larger than Tone-1 period. Spectre takes large steps during ramp-up because there are no high-frequency stimuli and the settling behavior of the circuit is rather slow. 

    Once the ramp up settles, we enable source of tone-1. Spectre automatically takes smaller steps since tone-1 is high in frequency and the circuit typically also responds faster to Tone-1 (hence the large number of harmonics and/or oversampling ratio for Tone-1). Since Tone-1 is typically large, enabling can often cause another transient that needs to settle before the circuit becomes periodic. However, this transient settles rather quickly since the circuit is typically designed to respond faster to changes in Tone-1 compared to that in supply voltages. So, we only need to allow a small stabilization window before taking measurements on steady state response.

    You likely know all this only too well - my apologies if I dragged you through it unnecessarily. Just to share my example, my current simulation is for a wireless receiver that requires 100us+ settling time for supply ramp-up, 1/1000th that for enabling the LO (Tone-1). When using transient analysis, it only takes me a couple minutes to get the circuit to settle before I can take measurements on steady-state behavior. However, when using harmonic balance, at 100 samples a period, spectre is essentially forced to compute close to a million samples during just supply ramp up, needing hours to get through tstab (hb itself only takes a few minutes after that). It will be *really* helpful if we can somehow replicate maxstep control in transient analysis to tstab in harmonic balance analysis as well.

    I know little of what that replication really means and I could be easily mistaken about the whole thing. But, I imagine the issue should be a frequent scenario with transceiver or mixed signal (switched capacitor) designs and would be really useful if it can be worked around.

    Please let me know if I can provide any further information - will be glad to. Thanks again for responding!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Raghu Rao

    Hi Raghu,

    I understand. I think the best thing here would be to contact customer support - sharing this information there (and ideally being able to see the example that is challenging) would be a good idea for us to work with Cadence R&D to figure out the best way of handling this (which almost certainly needs an enhancement). It's far more likely to be done if we can tie this to a real customer with a real example...

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to Raghu Rao

    Hi Raghu,

    I understand. I think the best thing here would be to contact customer support - sharing this information there (and ideally being able to see the example that is challenging) would be a good idea for us to work with Cadence R&D to figure out the best way of handling this (which almost certainly needs an enhancement). It's far more likely to be done if we can tie this to a real customer with a real example...

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • Raghu Rao
    Raghu Rao over 4 years ago in reply to Andrew Beckett

    Thanks, Andrew. Will do.

    Raghu

    • 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