Home > Community > Blogs > RF Design > guidelines for maximizing speed vs accuracy for harmonic balance part 1
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more conveniennt.

Register | Membership benefits
Get email delivery of the RF Design blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Guidelines for Maximizing Speed vs Accuracy for Harmonic Balance - Part 1

Comments(0)Filed under: RF design, Virtuoso Spectre Simulator GXL, Spectre RF, Virtuoso Spectre Simulator XL, Harmonic Balance, spectreRF, RF Simulation, Analog Simulation, ADE, RF, APS, HB, analog/RF


I am often asked for guidelines on maximizing speed vs. accuracy for SpectreRF harmonic balance simulations.  In a series of 3 blogs, I'll discuss some of the "knobs" that you can tweak, those being:

    * Which Engine:  Spectre or APS?
    * Oversample vs Number of Harmonics
    * Harmonic Trimming

Today, I'll discuss Knob 1. Choosing the appropriate engine....Spectre or APS?
The choice between Spectre vs APS boils down to the size of the circuit you are simulating (and the number of licenses you're willing to spend on the simulation.) APS takes more MMSIM tokens. See Article 20044367 .

Even for small circuits, APS will be faster than Spectre. This is because the CMOS models get more efficient and the solver gets more efficient when using APS, even if multithreading isn't turned on due to small circuit size.

For medium to large circuits (100+ devices), APS should be considerably faster. It is recommended that you start with 2 threads. (If you use 8 or 16 threads, the simulation may actually be slower than with 2 threads because the overhead cost of parallelization for the additional threads overshadows the speed advantage of additional threads for such small circuits.)

So, how can you determine how many threads to use? (i.e. determine the optimum number of threads to use for a particular circuit). 

  • Run your circuit in Spectre. Note the time it takes.
  • Run your circuit in APS with a single thread. Note the time it takes.
  • Run your circuit in APS with 2 threads. Note the time it takes.
  • If the simulation gets slower, stick with single thread. If it gets faster, try 4 threads. You can try up to 16 threads.

Note that the "auto" setting has some limitations. It checks for the number of CPUs on the machine and automatically spawns that number of jobs (so if it finds 8 CPUs, it spawns 8 CPU threads). It does not look at circuit size. It doesn't look at CPU utilization on the machine. When using multithreading, you need to be careful. The software assumes that other jobs are not running on the various cores available. If there are other jobs running, they will slow those cores down...which in turn slows down all core jobs. In general, it is recommended to use 1 thread per core.

You can specify which cores to use with the '-processor' keyword. See Solution 11584226 for more information. (http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11584226)

Another thing to consider when using APS is the preserve_inst option. For information on how preserve_inst affects speed vs accuracy in APS, see Solution 11642414: How does the spectre option preserve_inst affect simulation?   (http://support.cadence.com/wps/mypoc/cos?uri=deeplinkmin:ViewSolution;solutionNumber=11642414)

For more tips like this, please visit Cadence Online Support .  Please note that you must be a Cadence Customer on Maintenance to access this website .

Stay tuned....next time I'll talk about Knob 2.... Oversample vs Number of Harmonics!

Have fun simulating!

Best Regards,

Tawna Wilsey


Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
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.