ngspice/FAQ

428 lines
15 KiB
Plaintext
Raw Normal View History

2004-01-27 23:00:27 +01:00
Ngspice F.A.Q.Version 1.4
2003-11-02 23:35:53 +01:00
Maintained by Paolo Nenzi <p.nenzi@ieee.org>
2004-01-27 23:00:27 +01:00
Last update: 27-01-2004
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?
1.2 Why resurrecting Berkeley's Spice?
1.3 What is the project's goal?
1.4 What you are going to do?
1.5 Legal issues
1.6 What mailing lists exist for ngspice?
1.7 Are the mailing lists archived anywhere?
1.8 What newsgroups exist for ngspice?
1.9 Where can I get a copy of ngspice?
1.10 Where should I look on the World Wide Web for ngspice stuff?
1.11 Where should I look on the World Wide Web for Spice documentation?
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
2003-11-08 12:05:34 +01:00
1.1 What is ngspice?
2001-12-06 17:33:02 +01:00
2004-01-27 23:00:27 +01:00
Ngspice is a mixed-level/mixed-signal circuit simulator based on three
open source software packages: Spice3f5, Cider1b1 and Xspice:
- Spice3 is the most famous and used circuit simulator. It was
developed University of California at Berkeley (UCB), by "a cast of
thousand" (as they say).
- 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
models.
- Xspice is an extension to Spice3 that provides code modeling support
and simulation of digital components through an embedded event
driven algorithm.
The NG prefix has lot of meanings: Next Generation, New Good, etc.
Choose or invent the one you prefer. The heart of the project is the
ngspice program.
2001-12-06 17:33:02 +01:00
2003-11-02 23:35:53 +01:00
1.2 Why resurrecting Berkeley's Spice?
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
simulators inherited it's syntax. On the more technical side, spice3
uses good numerical algorithms (most commercial implementations have
only strengthened them), implements most of the models for MOSFET
submicron designs and has a powerful set of analyses. On the more
"social" side, spice3 it's well introduced in the academic
environment.
2003-11-02 23:35:53 +01:00
1.3 What is the project's goal?
The project goal evolved during project development, at first the
final goal was to develop a reliable, fast and friendly circuit
simulator for mixed signal/mixed level simulation. During
development it become apparent that to reach the goal a complete
rewrite of spice was needed. Since it was almost absurd to rewrite
Spice and since a new simulator was already under development:
2005-04-29 08:49:53 +02:00
ACS (Al's Circuit Simulator), now GNUCap (GNU Circuit Analysis
2003-11-02 23:35:53 +01:00
package), the goal of nspice became less utopical: merge
2003-11-08 12:05:34 +01:00
Spice3f5, Xspice and Cider into a mixed-signal/mixed-level simulator
that can be used as a reliable engine.
2003-11-02 23:35:53 +01:00
2003-11-08 12:05:34 +01:00
1.4 What you are going to do?
2003-11-02 23:35:53 +01:00
We are going to develop a mixed-signal/mixed-level circuit simulation
program integrating three different spice based simulators:
Spice, Xspice and Cider.
Xspice is a mixed-signal circuit simulator developed by GTRI (Georgia
Tech Research Institute) at Georgia Institute of Technology. Xspice
was originally developed as an extension over Spice3c1. Xspice
introduces code modeling and a digital simulator into ngspice.
The "home site" of Xspice is:
http://users.ece.gatech.edu/~mrichard/Xspice/
Cider is a mixed-level circuit and device simulator based on Spice3f5
that couples a device simulator (DSIM) to Spice. More information can
be found at:
http://www-cad.eecs.berkeley.edu/Software/cider.html
The merging process is done in parallel with bug fixing and improvement
of the three simulators. The improvements are concentrated into 6
2003-11-08 12:05:34 +01:00
directions:
2003-11-02 23:35:53 +01:00
+ Compact models: the improvements in compact models will address
mainly the implementation of additional effects not available
in the original code. Device specific improvements are documented
on ngspice's documentation and in the DEVICE file in project's
tarball.
Improvements that affects all devices already implemented are:
"dtemp" option to set instance's temperature relative to the circuit
2003-11-08 12:05:34 +01:00
one and "m" parallel multiplier to simulate an arbitrary number of
2003-11-02 23:35:53 +01:00
instances of the same kind connected in parallel.
Planned improvements are the development of a dynamic loading
mechanism for compact models, to avoid loading in memory devices
that are not needed, and SOAR (Safe Operating ARea) checks to
identify situations in which devices are used out of their
safety areas.
+ Simulator's analyses: this is a low priority area. Planned improvements
include the implementation of parametric analyses, to analyse the
2005-04-29 08:49:53 +02:00
behaviour of the circuit as a parameter changes. Parameter sweep,
2003-11-02 23:35:53 +01:00
Monte Carlo and Worst Case fall in this category. Network analysis
(double bipole parameters extraction) is another planned improvement.
+ Numerical analysis code: the improvements within the numerical code
must be done with extreme care. Planned improvements are, the
replacement of the Sparse library with the latest code Kenneth Kundert
has released, available at:
http://sourceforge.net/projects/sparse
Other planned improvements, but with very low priority, includes the
use SuperLU library as possible Sparse library replacement (the
library is available at http://crd.lbl.gov/~xiaoye/SuperLU) and the
introduction of continuation metohds to aid DC convergence.
+ Spice language: The language used to input the circuit to the simulator
has been extended and now allows the user to input parametric values
for components (the numparam library). This is an experimental feature
that will be improved in the future. Planned improvements includes the
support for loading more than one circuit, netlist manipulation via
command line (adding and removing instances) and the implementation
of a command history using the libedit library, available at:
http://sourceforge.net/projects/libedit
+ Frontend: The design of a new spice frontend has not been successful
and now is orphaned, since the is no interests and many free and
commercial frontends are available. There is no planned improvement
here.
+ Documentation: Commercial simulators come with very good manuals
2003-11-08 12:05:34 +01:00
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
for the new manual. It will be constantly improved during ngspice
2003-11-08 12:05:34 +01:00
development and integrated with the documentation accompanying Xspice
and Cider. This is a very time consuming task and probably the
documentation will always be left slightly behind.
2003-11-02 23:35:53 +01:00
2003-11-08 12:05:34 +01:00
1.5 Legal issues
2003-11-02 23:35:53 +01:00
Ngspice merges three different simulators: spice and cider are covered
with the "old" BSD license, Xspice by its own license. The ngspice
license will be then the BSD license.
Since the "old" BSD license is not compatible with the GPL library
it is not possible to link the ngspice with GPL'ed code, as is
written in:
http://www.gnu.org/philosophy/bsd.html
2003-11-08 12:05:34 +01:00
The group developing ngspice has written to Berkeley's copyright
holders asking to change the license to the new BSD, which has the
incompatibility removed, but without success.
2003-11-02 23:35:53 +01:00
2003-11-08 12:05:34 +01:00
Ngspice will not be released under GPL license and, no GPL code can be
linked into ngspice (as in the original Spice3f) without breaking GPL.
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
1.6. What mailing lists exist for ngspice?
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
There are three mailing lists dedicated to the ngspice project.
Users mailing list: <ngspice-users@lists.sourceforge.net>
This list is for ngspice users, examples, problems, bug reports
and general discussion on ngspice can be sent here
Developers mailing list: <ngspice-devel@lists.sourceforge.net>
The list dedicated to ngspice development. Developers shold
subscribe here, to follow the program development. May be used
to send patches, and technical discussion on ngspice.
Frontend mailing list: <ngspice-frontends@lists.sourceforge.net>
Almost orphaned, this list should be used to discuss issues about
the realization of a graphical frontend to ngspice.
Send an empty message to the following addresses to get information
on subscription.
<ngspice-users-help@lists.sourceforge.net>
2001-12-06 17:33:02 +01:00
<ngspice-devel-help@lists.sourceforge.net>
<ngspice-frontends-help@lists.sourceforge.net>
2003-11-08 12:05:34 +01:00
1.7. 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:
http://sourceforge.net/projects/ngspice
(look for the "Lists" link). Old messages from the pre-sourceforge
age are available at:
http://ngspice.sourceforge.net/lists.html
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
1.8. What newsgroups exist for ngspice?
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
There is no ngspice specific newsgroup. Anyway ngspice threads appear
on newsgroups dedicated to circuit simulation and electronic design.
An (incomplete) list is:
sci.electronics.cad
comp.lsi.cad
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
1.9. Where can I get a copy of ngspice?
2001-12-06 17:33:02 +01:00
You can download ngspice from:
2003-11-08 12:05:34 +01:00
http://sourceforge.net/projects/ngspice
2001-12-06 17:33:02 +01:00
2003-11-08 12:05:34 +01:00
1.10. Where should I look on the World Wide Web for ngspice stuff?
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
Look at the official Ngpice Web Page:
http://ngspice.sourceforge.net
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
1.11. Where should I look on the World Wide Web for Spice documenta-
tion?
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
There are a lot of Internet sites that have information on spice, the
2005-04-29 08:49:53 +02:00
best way is to point to your preferred search engine. Some interesting
2003-11-08 12:05:34 +01:00
sites are:
The Spice Home Page:
http://bwrc.eecs.berkeley.edu/Classes/IcBook/SPICE/
Xspice Page:
http://users.ece.gatech.edu/~mrichard/Xspic
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
Cider Page:
http://www-cad.eecs.barkeley.edu/Software/cider.html
Spice benchmarks:
http://www.cbl.ncsu.edu/pub/Benchmark_dirs
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
2003-11-08 12:05:34 +01:00
The latest version released is:
2004-01-27 23:00:27 +01:00
* ngspice-rework-15 (released on 10/12/2001)
2003-11-08 12:05:34 +01:00
2004-01-27 23:00:27 +01:00
The development version is:
2003-11-08 12:05:34 +01:00
2004-01-27 23:00:27 +01:00
* ngspice-rework-15pre3 (released on 28/01/2004)
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
New features:
2004-01-27 23:00:27 +01:00
+ Improved bipolar devices (Diode and bjt)
+ Improved BSIM3 and BSIM4
+ VBIC and HiSIM compact models
+ Cider and Xspice inclusion
+ More flexibility in net names
+ Parameter substitution in netlist
2001-12-06 17:33:02 +01:00
Bug fixes:
2004-01-27 23:00:27 +01:00
+ Many memory leaks closed
+ Control language works as expected
2000-04-27 22:03:57 +02:00
2003-11-08 12:05:34 +01:00
2.3. What does it looks 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
line simulator.
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
2003-11-08 12:05:34 +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
thousand", ngspice can only increase that number. An incomplete
list of contributor makes the "acknowledgements" page of ngspice
documentation.
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
mailing lists and post there. The latter is preferred since almost
all developers/contributors read the lists but only a few of them
use trackers.
2001-12-06 17:33:02 +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
your patch in the mailing list. Before you start coding check the
latest development release of ngspice from our CVS. It might be that
your feature has already been implemented.
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
2003-11-08 12:05:34 +01:00
Ngspice is written in C, and uses some GNU extensions, then you need
a GNU C compiler and a UNIX environment to compile it. Ngspice can
be compiled under Windows using the mingw or cigwin environment.
2005-04-29 08:49:53 +02:00
In the future a compatibility table will be written.
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?
This is a one-million-euros question :).
Write a mail to the user's list describing the problem and providing
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?
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:
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
Paolo Nenzi <p.nenzi@ieee.org>.
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
Send your comments about ngspice to:
2000-04-27 22:03:57 +02:00
2001-12-06 17:33:02 +01:00
Paolo Nenzi <p.nenzi@ieee.org>.
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
Parts of the questions and answers are originate from Paolo Nenzi.
2003-11-08 12:05:34 +01:00
4.4. Disclaimer and Copyright
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.