QSPICE: A Mission to Get SPICE Right

Author:
Siddharth Mohan, design engineer, Qorvo

Date
11/29/2024

 PDF
Redefining circuit simulation accuracy

Click image to enlarge

Figure 1: MOSFET channel punch-through showing outputs from previous SPICE simulators vs. QSPICE

Qorvo’s QSPICE™ simulator for analog and mixed-signal simulation provides power designers with the tools to confidently evaluate their designs. Free to use, QSPICE improves SPICE basics, supports large amounts of digital logic without performance penalties, and delivers the speed and accuracy needed for reliable power-based simulations. QSPICE is easy to use and has an intuitive user interface.

Introduction

QSPICE was authored by Mike Engelhardt, the go-to legend in the simulation field, to address the limitations of traditional SPICE by starting fresh. The original SPICE became complex and difficult to modify over time, making it necessary to rework the software from the ground up. Advances in hardware, such as GPUs and improved graphics bandwidth, provided a critical opportunity to overhaul the SPICE architecture.

One of the biggest issues with traditional SPICE is that it often adjusts circuit equations artificially by adding conductivity or damping, leading to incorrect results. These simulators struggle with circuits that include components with vastly different conductivity ranges. As a result, SPICE sometimes solves a modified version of the circuit, not the actual one.

Mike (who originally authored LTspice) has now developed the modern QSPICE to overcome these challenges by refactoring and fine-tuning the original SPICE code. It enhances speed, accuracy and performance while supporting seamless integration of large amounts of digital logic into SPICE simulations. Delve into the secrets about how Mike’s brainchild, QSPICE, is the next-gen simulator resetting the standard in the industry.

Speed and Efficiency

QSPICE is significantly faster than its predecessors because of improvements in the original SPICE code, minimizing function calls that previously slowed down execution. It uses separate executables for the waveform viewer and simulation, optimizing memory use. Unlike earlier simulators, QSPICE requires less memory and performs exact simulations on the provided circuit, eliminating the need for multiple simulations to fix circuit errors.

QSPICE efficiently manages time-step control, one of SPICE's longstanding issues. While traditional simulators rely on 80-bit extended precision math, which can be slow, QSPICE selectively applies 80-bit precision only where necessary. For most calculations, 64-bit precision is sufficient, speeding up the simulation without compromising accuracy.

Mixed-Signal Simulations

QSPICE offers a versatile modeling language that allows users to input C code directly into simulations. It compiles C code into native Intel object code for fast processing, supporting massive amounts of digital logic. This capability enables the simulation of complex mixed-signal designs with virtually unlimited digital components, outperforming older SPICE tools.

Users can also simulate real parts and components from various manufacturers, not just Qorvo’s. The platform includes C++/Verilog compilers that allow users to write custom models, providing flexibility for complex designs. Additionally, QSPICE features error-handling tools, such as syntax highlighting and direct links to errors, similar to debugging environments in C++ and Verilog.

SPICE Basics and Device Models

QSPICE is not only faster but more reliable at solving basic SPICE tasks. Device model equations have been revised to eliminate bugs, such as discontinuities in MOSFET I-V curves, which plagued older SPICE simulators. QSPICE delivers smooth, continuous I-V curves, free of simulation artifacts.

The plots in Figure 1 demonstrate an issue known as MOSFET channel punch-through, a previously unpublished discontinuity in Berkeley SPICE common in most SPICE simulators, including commercial ones. QSPICE produces smooth device I-V curves, as shown in the results on the right.

While traditional SPICE was originally designed for integrated circuits (ICs), QSPICE excels at simulating power transistors, particularly newer devices like SiC and GaN transistors. It extends device equations to accurately handle power devices, offering better modeling for vertical MOSFETs and other power transistors.

Advanced Power Device Simulations

QSPICE provides more accurate power dissipation calculations by factoring in resistive losses in semiconductors. It modifies device equations to report only real current flowing through real voltage, excluding displacement currents. For power device designers, this feature improves the accuracy of thermal simulations and energy loss estimations.

Additionally, QSPICE supports new methods for integrating differential equations, which enhance the simulation of non-ideal components. It also introduces advanced modeling for features like gate leakage in GaN devices and charge models for power transistors.

QSPICE allows users to plot the actual power dissipation in devices, rather than just the energy flow into components. This means it accurately calculates the power dissipated in the resistive losses of series and parallel reactances. For semiconductors, QSPICE modifies the device equations to report only the real current flowing through the real voltage, excluding current related to energy stored in the device's reactances. Displacement currents are still included in the simulation but are not factored into the reported power dissipation, since they don't contribute to heating.

Improved Simulation Features

QSPICE introduces several new features and improvements over traditional SPICE, including:

  1. Realistic Diode Behavior: Most SPICE programs simulate diodes unrealistically by treating them as "snap" diodes that switch off instantly. QSPICE introduces a parameter called "VP" to dampen the diode turn-off behavior, providing more realistic simulations.
  2. Access to Resistor Current: Unlike standard SPICE, QSPICE allows users to access directly the current through resistors, expanding its utility for behavioral sources and other complex circuits.
  3. Operating Point Data: QSPICE allows users to view operating point data directly on the schematic. By hovering over components or nets, users can see real-time data without rerunning the entire simulation.
  4. Thermal Models: QSPICE supports transistor models with thermal parameters, enabling simulations that account for self-heating and thermal effects, which are critical for power device design. See Figure 2.

Click image to enlarge

Figure 2: Device Q1 self-heating node

 

  1. Transient Noise Simulations: QSPICE handles stochastic noise in linear circuits based on first principles, providing more accurate noise analysis for sensitive analog circuits.
  2. Frequency Response Analysis (FRA): The built-in .AC analysis feature allows users to evaluate the frequency response of their circuits, making it easy to design filters, amplifiers, and converters.
  3. QSPICE supports both Monte Carlo (MC) and Worst Case (WC) analysis, along with the use of Random() and Gauss(sigma) functions.

8.  QSPICE supports FFT (Fast Fourier Transform) along with various FFT windowing functions. Figure 3 is an example of the FFT window configuration in QSPICE.

Click image to enlarge

Figure 3: QSPICE FFT window configuration

 

9. Users often report simulation artifacts like ringing in their SPICE simulations, where SPICE settings can be helpful for debugging. QSPICE supports both Gear and Trapezoid integration methods.

10. QSPICE supports command-line execution. You can start a QSPICE simulation from the command line using the QSPICE64.exe or QSPICE80.exe executables found in the installation folder.

GPU Acceleration and Graphics

QSPICE takes advantage of GPU acceleration for fast, high-quality graphics rendering. This allows users to view publication-ready schematics and waveform data directly from the simulation without the need for additional software. GPU-rendered graphics in QSPICE are dithered to appear smooth and pixel-free, eliminating the need for vector graphics export. See Figure 4.

Click image to enalrge

Figure 4: GPU-rendered graphics vs. CPU-rendered graphics

 

QSPICE can also export waveform data in equally spaced time steps for those who want to plot it in external tools like Excel. However, QSPICE’s built-in graphics are already optimized for high-quality output, with the ability to copy, paste and save images in various formats like .jpg or .png.

User Interface and Component Libraries

QSPICE features a modern, streamlined user interface designed for intuitive navigation. It avoids the complexity of modal dialogs found in older CAD programs, ensuring a smoother user experience.

QSPICE also allows for the loading of CMI (Code Memory Interface) parameters through I2C interfaces, providing users with additional flexibility when working with real-world parts.

Conclusion

QSPICE marks a major leap in circuit simulation by addressing the growing need for advanced simulation capabilities. It enhances traditional SPICE with faster speeds, greater functionality, increased accuracy and enhanced reliability. Moreover, QSPICE supports large-scale digital simulations and allows the use of part models from other manufacturers. The built-in C++/Verilog compilers generate publication-quality graphics. Best of all, QSPICE is available for free. Additionally, Qorvo provides a user forum where experts and peers assist with various applications of QSPICE.

Qorvo


RELATED