To speed up circuit simulations in SPICE engines like 3Spice—an enhanced simulator derived from the Berkeley SPICE 3 core—you must optimize how the underlying mathematical matrix solver calculates component states.
By balancing precision with simulator options, you can dramatically cut down processing times. Here are the top 10 tips to make your simulations run faster: 1. Relax Solver Tolerances (RELTOL)
The easiest way to boost speed is to increase the relative error tolerance (RELTOL). By default, it is usually set to 0.001 (0.1% accuracy). Increasing this parameter to 0.005 or 0.01 allows the solver to reach convergence in fewer iterations.
Note: Only do this if extreme precision is not required for your current design phase. 2. Set Realistic Maximum Timesteps (DELMAX)
Leaving the maximum timestep blank forces the simulator to guess, often resulting in incredibly tiny, computationally heavy increments. Manually set a maximum timestep that is 1/50th to 1/100th of your highest frequency cycle. This prevents the engine from grinding to a halt on simple waveforms. 3. Use Initial Conditions (.IC) to Skip Startup Transients
Waiting for power supplies to ramp up and large capacitors to charge wastes significant CPU time. Use the .IC directive or schematic properties to pre-charge capacitors and set initial node voltages to their expected steady-state levels. 4. Switch from GEAR to TRAP Integration
If you are simulating highly reactive, high-speed analog systems, look at your integration settings. The Trapezoidal (TRAP) method is mathematically faster and more precise than GEAR. Use GEAR only if your simulation suffers from unrealistic numerical oscillations (common in power electronics). 5. Simplify Subcircuits and Behavioral Models
High-pin-count IC models (.SUBCKT) or complex behavioral equations (B-sources) can overcomplicate the modified nodal analysis matrix. Substitute intricate integrated circuit models with simplified, idealized macromodels or cycle-averaged equivalents during early-stage testing. 6. Consolidate Grounds and Minimize Floating Nodes
A chaotic schematic creates unnecessary matrix rows. Ensure every parallel branch has a clean, direct path to a common ground rather than chaining multiple long wires together. Additionally, attach a high-value resistor (e.g., 10 MΩ) to any floating nodes to prevent the solver from choking on undefined voltages. 7. Delay the Simulation Data Save Window Introduction to SPICE – the basics
Leave a Reply