Ngspice

Last updated
Ngspice
Original author Paolo Nenzi et. al. [1] [a]
Developers Ngspice Contributors Team: Holger Vogt, Giles Atkinson, Brian Taylor, Dietmar Warning e.a.
Initial release1993;
32 years ago
 (1993)
Stable release
45.2 / 5 September 2025
(2 months ago)
 (2025-09-05)
Repository sourceforge.net/projects/ngspice/files/ng-spice-rework/
Written inC
Operating system Linux, Windows, macOS, BSD, others
Platform x86-64, Apple silicon, and others [b]
Size 7.6 MB (Linux)
Available inEnglish
Type Electronic circuit simulation
License BSD-3-Clause
Website ngspice.sourceforge.io

Ngspice [2] [3] [4] is an open-source mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE, version 3f.5, which was released in 1993. A small group of maintainers and the user community contribute to the ngspice project by providing new features, enhancements and bug fixes.

Contents

Ngspice is based on three open-source free-software packages: Spice3f5, Xspice and Cider1b1:

Analysis types

Ngspice implements three classes of analysis:

Transient analysis includes transient noise simulation. AC analysis includes small-signal noise simulation, pole-zero and transfer function analysis: [9]

Device models

Ngspice implements various circuits elements, like resistors, capacitors, inductors (single or mutual), transmission lines and a growing number of semiconductor devices like diodes, bipolar transistors, MOSFETs (both bulk and SOI), MESFETs, JFETs and HFETs. Verilog-A compact device models [10] are supported.

Netlists

Ngspice supports parametric netlists (i.e. netlists can contain parameters and expressions). PSPICE compatible parametric macromodels, often released by manufacturers, can be imported as-is into the simulator. Polynomial sources are available. Ngspice provides an internal scripting language to facilitate complex simulation and evaluation control flows. Open source Process design kits (PDKs) [11] [12] [13] are fully supported, HSPICE compatible PDKs as far as possible.

Mixed-signal simulation

Ngspice makes available mixed-signal simulation, where ngspice is responsible for the analogue part, and the digital part is provided by Verilog, compiled with Verilator or Icarus Verilog, or in case of VHDL compiled with GHDL. The interface is provided by a dedicated code model (d_cosim), as described in chapters 8.4.25 and 10.3 of the ngspice manual [14] .

Defining new models

For mixed-signal circuit simulation with new internal code models ngspice allows users to create a user-defined node definition file (UDN) of a new device model interface. The implementation of the node is created and simulated by using C language with macros which is compiled by standard C/C++ compilers.

New models can be added to the simulator using:

Available ngspice variants

Ngspice has a command line input interface and offers plotting capability. An open source GUI with schematic entry, simulation and plotting is provided by Qucs-S. A GUI focussing on IC development is XSCHEM.

In addidtion to its standard executable, ngspice may be compiled into a shared library (*.dll or *.so) readily to be integrated into a calling program. Its interface provides access to all simulation parameters, input and output data. tclspice, another shared library version, offers an interface to Tcl/Tk (software) for better integration with software like XCircuits.

Miscellaneous

Ngspice is licensed under the BSD-3-Clause license. This permissive open source license allows its integration as a simulation engine into several — proprietary or free/libre — EDA tools such as KiCad, [16] [17] EAGLE (program), [18] CoolSPICE, Altium and others.


Ngspice progress has been continuously presented at FOSDEM [19] and FSiC [20] conferences since 2019.

See also

Notes

  1. Over 67 contributors have worked on ngspice over time
  2. Compiler dependent. See C language compilers like GCC, clang, or MS Visual C++ for specific ISA and supported platforms.

References

  1. "Ngspice circuit simulator - Authors". ngspice.sourceforge.net. Retrieved 2022-05-26.
  2. NGSPICE: recent progresses and future plans, P. Nenzi e.a., MOS-AK, Bucharest 2014, http://www.mos-ak.org/bucharest/ Archived 2022-07-06 at the Wayback Machine
  3. "The NGSPICE circuit simulator". archive.fosdem.org. Retrieved 2024-02-15.
  4. "ngspice, current status and future developments". archive.fosdem.org. Retrieved 2024-02-15.
  5. Analysis of Performance and Convergence Issues for Circuit Simulation, T. Quarles, PhD dissertation, Memorandum No. UCB/ERL M89/42, Berkeley 1989, http://www.eecs.berkeley.edu/Pubs/TechRpts/1989/ERL-89-42.pdf
  6. Code-level modeling in XSPICE, F. L. Cox e.a., Proceedings IEEE International Symposium on Circuits and Systems, 1992 (ISCAS 92), vol. 2, pp. 871-874, 10–13 May 1992
  7. Gates, David A. (June 1993). "Design-Oriented Mixed-Level Circuit and Device Simulation - PhD thesis" (PDF). University of California, Berkeley . Retrieved 2023-08-28.
  8. CODECS: A Mixed-Level Circuit and Device Simulator, K. Mayaram, Memorandum No. UCB/ERL M88/71, Berkeley, 1988, http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/ERL-88-71.pdf Archived 2021-01-23 at the Wayback Machine
  9. "ngspice / ngspice / [c4efe2] /ANALYSES". sourceforge.net. Archived from the original on 2022-05-26. Retrieved 2022-05-26.
  10. "Verilog-A Models for Circuit Simulation" . Retrieved 2025-11-15.
  11. "IHP-Open-PDK" . Retrieved 2025-11-15.
  12. "Open_PDKs version 1.0 PDK Installer for open-source tools" . Retrieved 2025-11-15.
  13. "OpenPDKs" . Retrieved 2025-11-15.
  14. "ngspice manual" (PDF). Retrieved 2025-11-15.
  15. "OpenVAF-Reloaded" . Retrieved 2025-11-15.
  16. "Tutorial: how to set up ngspice and Eeschema for KiCad". ngspice. Retrieved 2019-07-18.
  17. Integrated Spice Simulation with Kicad, T. Wlostowski, FOSDEM, Brussels 2017, https://archive.fosdem.org/2017/schedule/event/spice_kicad/
  18. SPICE Simulation Part 1, S. Sattel, Autodesk Support and Learning, 2017, https://www.autodesk.com/products/eagle/blog/spice-simulation-part-1/
  19. "ngspice - xspice elemental devices made available in kicad". Free and Open source Software Developers' European Meeting (FOSDEM). Retrieved 2025-11-16.
  20. "Ngspice_-_status_update,_and_degradation_simulation". Free Silicon Foundation (F-Si). Retrieved 2025-11-16.{{cite web}}: CS1 maint: url-status (link)