ngspice/FAQ

363 lines
13 KiB
Plaintext
Raw Permalink Normal View History

2023-08-11 14:12:50 +02:00
Ngspice F.A.Q.Version 2.9 (ngspice-41 release)
2018-05-19 23:03:02 +02:00
2018-09-14 20:54:53 +02:00
Maintained by Holger Vogt
2023-08-11 14:12:50 +02:00
Last update: Aug 11 2023
2001-12-06 17:33:02 +01:00
This document contains the Frequently Asked Questions (and Answers)
for ngspice project.
2003-11-02 23:35:53 +01:00
__________________________________________________________________________
2001-12-06 17:33:02 +01:00
Table of Contents
1. INTRODUCTION AND GENERAL INFORMATION
1.1 What is ngspice?
2018-09-14 20:54:53 +02:00
1.2 What is sharedspice?
2014-01-04 15:42:57 +01:00
1.3 What is tclspice ?
1.4 Why resurrecting Berkeley's Spice?
1.5 What is the project's goal?
1.6 What you are going to do?
1.7 Legal issues
2017-08-23 23:48:28 +02:00
1.8 Discussion groups
1.9 What mailing lists exist for ngspice?
1.10 Are the mailing lists archived anywhere?
2014-01-04 15:42:57 +01:00
1.11 Where can I get a copy of ngspice?
1.12 Where should I look on the World Wide Web for ngspice stuff?
1.13 Where should I look on the World Wide Web for Spice documentation?
2020-04-27 11:26:33 +02:00
1.14 Are there some (official) tutorials available?
2001-12-06 17:33:02 +01:00
2. DEVELOPMENT
2000-04-27 22:03:57 +02:00
2.1 What is the current version?
2.2 What are the latest features in the current release?
2001-12-06 17:33:02 +01:00
2.3 What does it look like?
2.4 Who are the authors of ngspice?
2000-04-27 22:03:57 +02:00
2.5 How can I report a bug/request for a feature?
2.6 How can I join the development?
2001-12-06 17:33:02 +01:00
3. SOLUTIONS TO COMMON MISCELLANEOUS PROBLEMS
2000-04-27 22:03:57 +02:00
3.1 What systems are supported?
3.2 I get errors when I try to compile the source code, why?
2003-11-02 23:35:53 +01:00
3.3 This document didn't answer my question. Where else can I look for
an answer?
2001-12-06 17:33:02 +01:00
4. ADMINISTRATIVE INFORMATION AND ACKNOWLEDGEMENTS
2000-04-27 22:03:57 +02:00
4.1 Feedback
4.2 Formats in which this FAQ is available
4.3 Authorship and acknowledgements
4.4 Disclaimer and Copyright
2001-12-06 17:33:02 +01:00
______________________________________________________________________
2003-11-02 23:35:53 +01:00
1. INTRODUCTION AND GENERAL INFORMATION
2001-12-06 17:33:02 +01:00
1.1 What is ngspice ?
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
Ngspice is a mixed-level/mixed-signal circuit simulator, based on three
open source software packages: Spice3f5, Cider1b1 and Xspice, and
including many bug fixes and enhancements:
2014-01-04 15:42:57 +01:00
- Spice3 is a widely used circuit simulator. It was developed by the
University of California at Berkeley (UCB), by "a cast of thousand"
(as they say) initially under the guide of Donald O. Peterson.
2014-01-04 15:42:57 +01:00
- Cider is a mixed-level simulator that already includes Spice3f5 and
adds a device simulator to it: DSIM. Cider couples the circuit level
simulator to the device simulator to provide greater simulation
accuracy (at the expense of greater simulation time). Critical
devices can be described with technology parameters (numerical
models) and non critical ones with the original spice's compact
2004-01-27 23:00:27 +01:00
models.
2014-01-04 15:42:57 +01:00
- Xspice is an extension to Spice3 that provides code modeling support
and simulation of digital components through an embedded event
2004-01-27 23:00:27 +01:00
driven algorithm.
2017-08-23 23:48:28 +02:00
The NG prefix has lot of meanings: Next Generation, New (and) Good, etc.
2014-01-04 15:42:57 +01:00
Choose or invent the one you prefer. The heart of the project is the
2014-01-04 15:42:57 +01:00
ngspice program, with its tremendous advancements.
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
1.2 What is sharedspice ?
2014-01-04 15:42:57 +01:00
Sharedspice is an interface option to ngspice. It compiles the simulator
into a shared object (or dynamic link library), providing full control
2020-04-27 11:26:33 +02:00
over ngspice to any suitable controlling program (GUI, optimizer,
2014-01-04 15:42:57 +01:00
development system, etc., to be provided by the user).
1.3 What is tclspice ?
Tclspice is a another interface option of ngspice, providing a tcl/tk
interface to the user. Tclspice is both a batch and interactive simulator
and a building block for simulator applications. Analyses can be run
from a tcl script and vector plotted or post processed using tcl. A small
GUI may be built by the user to analyze a circuit or a set of circuits.
Tclspice is obtained compiling ngspice activating an additional option.
This has not been used and tested for some time now.
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
1.4 Why resurrecting Berkeley's Spice?
2014-01-04 15:42:57 +01:00
2001-12-06 17:33:02 +01:00
Berkeley's Spice can be considered the father of most circuit
simulators available today. It is an old but still good piece of
software, it may not be the fastest or the most reliable but it's
free, it's available in source code and most of the electrical
2014-01-04 15:42:57 +01:00
simulators inherited it's syntax. Spice3 is based on proven numerical
algorithms (most commercial implementations have only strengthened
them), implements most of the models for MOSFET submicron design
and has a powerful set of analyses. The readily availability of
its source code in the past made this simulator the de-facto standard.
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
1.5 What is the project's goal?
2003-11-02 23:35:53 +01:00
Ngspice is both a maintenance and enhancement project. It is a maintenance
project because it aims to provide the free EDA community the best spice3
simulator available. This means fixing bugs, adding new features but always
2014-01-04 15:42:57 +01:00
in the spice3 framework. Achieving compatibility with commercial spice based
simulators and provide users the latest devices models are important goals
2014-01-04 15:42:57 +01:00
of the project. Improvements in the postprocessing (data handling
capabilities) and user interface are other goals.
2003-11-02 23:35:53 +01:00
2023-01-24 16:25:11 +01:00
1.6 What are you going to do?
2003-11-02 23:35:53 +01:00
An official roadmap for ngspice was never drawn. Contributions made by
2014-01-04 15:42:57 +01:00
developers drive ngspice development and the roadmap is built day by
day by developers writing on the lists. Ngspice development activity
can be summarized in 3 points:
2003-11-02 23:35:53 +01:00
+ Compatibility: Ngspice should be compatible with commercial products,
2014-01-04 15:42:57 +01:00
thus allowing people to use the netlist generated for such tools. As
2014-01-04 15:42:57 +01:00
most of the commercial simulators available tracked each other in netlist
language, this should not be an impossible task. The most important goal
here is to provide a reliable support for model libraries coming from
foundries. Some compatibility switches are available.
2014-01-04 15:42:57 +01:00
+ Compact models: The interest in using ngspice is intimately connected
2014-01-04 15:42:57 +01:00
to the available models. To provide the latest models available for
active and passive devices is a fundamental goal of the project. In
2023-01-24 16:25:11 +01:00
this direction we are integrating OSDI interface into ngspice for
reading OpenVAF compiled Verilog-A compact models.
2014-01-04 15:42:57 +01:00
+ Documentation: Commercial simulators come with very good manuals
containing tutorials, description of models equations, example of
use, suggestions, etc. Spice came with little documentation. The
2005-04-29 08:49:53 +02:00
Spice3f manual, available on the Internet has been used as the basis
2023-01-24 16:25:11 +01:00
for the ngspice manual. It will be constantly improved during ngspice
development. The ngspice manual today contains description of all
2018-09-14 20:54:53 +02:00
features ngspice is offering. It is however not a tutorial of ngspice
2023-01-24 16:25:11 +01:00
usage, but there are several good ones available on the internet
2022-10-23 15:23:49 +02:00
(see https://ngspice.sourceforge.io/tutorials.html).
2014-01-04 15:42:57 +01:00
2003-11-02 23:35:53 +01:00
2014-01-04 15:42:57 +01:00
1.7 Legal issues
2003-11-02 23:35:53 +01:00
2014-01-04 15:42:57 +01:00
The ngspice base license is new BSD, as provided by UCB. For some parts
2018-09-14 20:54:53 +02:00
of the code other compatible licences apply. All licenses are DFSG
compatible. Please see file COPYING for details.
2001-12-06 17:33:02 +01:00
2017-08-23 23:48:28 +02:00
1.8 Discussion groups
Vivid discussion are going on in the ngspice discussion groups.
They are found at https://sourceforge.net/p/ngspice/discussion/
2023-08-11 14:12:50 +02:00
A special group 'ngspice tips and examples' will present interesting
2017-08-23 23:48:28 +02:00
ngspice tips (your input is welcome!)
1.9 What mailing lists exist for ngspice?
Mailing lists have somewhat lost importance compared to the
discussion groups described above.
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
There are two general mailing lists dedicated to the ngspice project.
2003-11-08 12:05:34 +01:00
Users mailing list: <ngspice-users@lists.sourceforge.net>
2014-01-04 15:42:57 +01:00
This list is for ngspice users. Examples, problems, bug reports
2014-01-04 15:42:57 +01:00
and general discussion on ngspice can be sent here.
2003-11-08 12:05:34 +01:00
Developers mailing list: <ngspice-devel@lists.sourceforge.net>
2014-01-04 15:42:57 +01:00
The list is dedicated to ngspice development. Developers should
2003-11-08 12:05:34 +01:00
subscribe here, to follow the program development. May be used
2014-01-04 15:42:57 +01:00
to send patches, and technical discussion on ngspice.
2013-03-16 22:16:56 +01:00
Send an empty message with Subject "help" to the following addresses
to get instructions.
2014-01-04 15:42:57 +01:00
2013-03-16 22:16:56 +01:00
<ngspice-users-request@lists.sourceforge.net>
<ngspice-devel-request@lists.sourceforge.net>
Send an empty message to the following address to Subscribe.
<ngspice-users-join@lists.sourceforge.net>
<ngspice-devel-join@lists.sourceforge.net>
Documentation about the user interface of
these mailing lists can be found at:
http://www.gnu.org/software/mailman/mailman-member
2001-12-06 17:33:02 +01:00
2017-08-23 23:48:28 +02:00
1.10 Are the mailing lists archived anywhere ?
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
Yes, the lists are archived. There are two places where to look for
2005-04-29 08:49:53 +02:00
archives. The project started on the IEEE Central and South Italy
2003-11-08 12:05:34 +01:00
web server and then moved to sourceforge. Sourceforge provides an
archiving service that cam be accessed via the summary page:
2014-01-04 15:42:57 +01:00
2022-10-23 15:23:49 +02:00
https://sourceforge.net/p/ngspice/mailman/
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
1.11 Where can I get a copy of ngspice?
2001-12-06 17:33:02 +01:00
2022-10-23 15:23:49 +02:00
You can download ngspice source code or MS Windows executables from:
2001-12-06 17:33:02 +01:00
2022-10-23 15:23:49 +02:00
https://sourceforge.net/projects/ngspice/files/ng-spice-rework/
Nearly all distributions for MINGW, Cygwin, Linux, macOS and
2023-08-11 14:12:50 +02:00
others offer install-ready copies of ngspice. Please see
https://repology.org/project/ngspice/packages for packages
available.
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
1.12 Where should I look on the World Wide Web for ngspice stuff?
2000-04-27 22:03:57 +02:00
2023-08-11 14:12:50 +02:00
Have a look at the official Ngpice Web Page:
2014-01-04 15:42:57 +01:00
2022-10-23 15:23:49 +02:00
https://ngspice.sourceforge.io
2000-04-27 22:03:57 +02:00
2014-01-04 15:42:57 +01:00
1.13 Where should I look on the World Wide Web for Spice documentation?
2000-04-27 22:03:57 +02:00
2010-09-25 16:34:58 +02:00
There is a detailed ngspice manual available at:
2022-10-23 15:23:49 +02:00
https://ngspice.sourceforge.io/docs.html
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
Others docs are assembled at:
2022-10-23 15:23:49 +02:00
https://ngspice.sourceforge.io/literature.html
2023-08-11 14:12:50 +02:00
https://ngspice.sourceforge.io/tutorials.html
https://ngspice.sourceforge.io/books.html
2000-04-27 22:03:57 +02:00
2020-04-27 11:26:33 +02:00
1.14 Are there some (official) tutorials available?
Yes, they are, for ngspice, ngspice within KiCAD and on eletro-thermal
simulation. You may find them at:
2022-10-23 15:23:49 +02:00
https://ngspice.sourceforge.io/tutorials.html
2020-04-27 11:26:33 +02:00
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
2. DEVELOPMENT
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
2.1. What is the current version?
2000-04-27 22:03:57 +02:00
2014-01-04 15:42:57 +01:00
The latest version released is:
ngspice-43 (released on July 14 2024)
2014-01-04 15:42:57 +01:00
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
2.2. What are the latest features in the current release?
2001-12-06 17:33:02 +01:00
2023-01-24 16:25:11 +01:00
Please see file NEWS accompaniing this FAQ.
2000-04-27 22:03:57 +02:00
2010-09-25 16:34:58 +02:00
2.3. What does it look like?
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
Ngspice, as the original Spice3 (and Xspice and Cider) is a command
2023-01-24 16:25:11 +01:00
line simulator, but with a graphics output capability. Excellent
open source third party tool for schematic capture (KiCad, XSCHEM,
Qucs-S and others) are available.
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
2.4. Who are the authors of ngspice?
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
The development is open to anyone who wish to contribute. If the
original Spice3 was made with the contribution of "a cast of
2003-11-08 12:05:34 +01:00
thousand", ngspice can only increase that number. An incomplete
2010-09-25 16:34:58 +02:00
list of contributor makes the "acknowledgements" page of the ngspice
2014-01-04 15:42:57 +01:00
manual.
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
2.5. How can I report a bug/request for a feature?
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
The ngspice summary page (hosted on Sourceforge) has bug-reporting,
feature-request and bugs trackers. You can use them or subscribe to
2010-09-25 16:34:58 +02:00
mailing lists and post there. The former is preferred since almost
it allows to track all necessary actions upon a bug. The web site at
2022-10-23 15:23:49 +02:00
https://ngspice.sourceforge.io/bugrep.html will give you more details.
2001-12-06 17:33:02 +01:00
2014-01-04 15:42:57 +01:00
2003-11-08 12:05:34 +01:00
2.6. How can I join the development?
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
To join the development just code the feature you want to add and send
2023-08-11 14:12:50 +02:00
your patch to the dev discussion group, open a ticket at the ngspice
Patches page or post a merge request
with Sourceforge. Before you start coding check the
latest development release of ngspice from our git repository.
It might be that your feature has already been implemented.
2014-01-04 15:42:57 +01:00
2003-11-08 12:05:34 +01:00
There is no bureaucracy here.
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
3. SOLUTIONS TO COMMON MISCELLANEOUS PROBLEMS
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
3.1. What systems are supported?
2001-12-06 17:33:02 +01:00
Ngspice is written in C, C++, and uses some GNU extensions. You may use
a GNU C/C++ compiler and a LINUX environment to compile it. Ngspice can
2014-01-04 15:42:57 +01:00
be compiled under Windows using the mingw or cygwin environment as
2020-04-27 11:26:33 +02:00
well as MS Visual Studio. It will readily compile on macOS.
FreeBSD or Solaris will do, but are not officially supported.
2014-01-04 15:42:57 +01:00
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
3.2. I get errors when I try to compile the source code, why?
2014-01-04 15:42:57 +01:00
This is a one-million-euros question :).
2017-08-23 23:48:28 +02:00
Write to the user's discussion group describing the problem and providing
2003-11-08 12:05:34 +01:00
information on the type of hardware, the flavour of operating system.
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
3.3. This document didn't answer my question. Where else can I look
for an answer?
2014-01-04 15:42:57 +01:00
2001-12-06 17:33:02 +01:00
Read old messages from the mailing list archive, search the web site
or read the docs. Upgrade to the latest version of ngspice, many
problems are fixed in the new versions. If you still can't find an
2003-11-08 12:05:34 +01:00
answer, post your question to the mailing lists.
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
4. ADMINISTRATIVE INFORMATION AND ACKNOWLEDGEMENTS
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
4.1. Feedback
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
Send your comments about this F.A.Q. to:
2017-08-23 23:48:28 +02:00
https://sourceforge.net/p/ngspice/discussion/127605/
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
4.2. Formats in which this FAQ is available
2001-12-06 17:33:02 +01:00
This document is available only in ASCII format in the ngspice source
2000-04-27 22:03:57 +02:00
package.
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
4.3. Authorship and acknowledgements
2000-04-27 22:03:57 +02:00
2018-09-14 20:54:53 +02:00
Parts of the questions and answers originate from Paolo Nenzi
2017-08-23 23:48:28 +02:00
and are updated by Holger Vogt.
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
4.4. Disclaimer and Copyright
2001-12-06 17:33:02 +01:00
Copyright: Holger Vogt, 2024
2018-09-14 20:54:53 +02:00
License: Creative Commons Attribution Share-Alike (CC-BY-SA) v4.0.
2001-12-06 17:33:02 +01:00
This document is provided as is. The information in it is not
warranted to be correct: you use it at your own risk.