HOME

TheInfoList



OR:

''Ngspice'' is an open-source mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley
SPICE A spice is a seed, fruit, root, bark, or other plant substance primarily used for flavoring or coloring food. Spices are distinguished from herbs, which are the leaves, flowers, or stems of plants used for flavoring or as a garnish. 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. Ngspice is based on three open-source
free-software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
packages: Spice3f5, Xspice and Cider1b1: *
SPICE A spice is a seed, fruit, root, bark, or other plant substance primarily used for flavoring or coloring food. Spices are distinguished from herbs, which are the leaves, flowers, or stems of plants used for flavoring or as a garnish. Spice ...
is the origin of all electronic circuit simulators, its successors are widely used in the electronics community. * Xspice is an extension to Spice3 that provides additional C language code models to support analog behavioral modeling and co-simulation of digital components through a fast event-driven algorithm. * Cider adds a numerical device simulator to ngspice. It couples the circuit-level simulator to the device simulator to provide enhanced simulation accuracy (at the expense of increased simulation time). Critical devices can be described with their technology parameters (numerical models), all others may use the original ngspice compact models.


Overview


Analysis types

Ngspice implements three classes of analysis: *Nonlinear DC analyses *Nonlinear transient analyses *Linear AC analyses Transient analysis includes transient noise simulation. AC analysis includes small-signal noise simulation, pole-zero and transfer function analysis: *
Noise Noise is unwanted sound considered unpleasant, loud or disruptive to hearing. From a physics standpoint, there is no distinction between noise and desired sound, as both are vibrations through a medium, such as air or water. The difference aris ...
analysis ** Small signal noise (AC) ** Transient noise * Operating point analysis — determines the dc operating point of the circuit with inductors shorted and capacitors opened. * Operating point sweep analysis — determines the values of output variables while one or two specified independent voltage or current source is stepped over * Pole-zero analysis (AC) * Small-Signal distortion analysis and frequency response analysis (AC) * Sensitivity analysis (DC/AC) * Transfer function analysis * Transient analysis * Periodic steady state analysis * S-parameter analysis


Device models

Ngspice implements various circuits elements, like resistors,
capacitor A capacitor is a device that stores electrical energy in an electric field by virtue of accumulating electric charges on two close surfaces insulated from each other. It is a passive electronic component with two terminals. The effect of ...
s,
inductor An inductor, also called a coil, choke, or reactor, is a passive two-terminal electrical component that stores energy in a magnetic field when electric current flows through it. An inductor typically consists of an insulated wire wound into a c ...
s (single or mutual),
transmission line In electrical engineering, a transmission line is a specialized cable or other structure designed to conduct electromagnetic waves in a contained manner. The term applies when the conductors are long enough that the wave nature of the transmi ...
s and a growing number of semiconductor devices like diodes,
bipolar transistor A bipolar junction transistor (BJT) is a type of transistor that uses both electrons and electron holes as charge carriers. In contrast, a unipolar transistor, such as a field-effect transistor, uses only one kind of charge carrier. A bipolar t ...
s, MOSFETs (both bulk and SOI),
MESFET A MESFET (metal–semiconductor field-effect transistor) is a field-effect transistor semiconductor device similar to a JFET with a Schottky (metal–semiconductor) junction instead of a p–n junction for a gate. Construction MESFETs are constr ...
s,
JFET The junction-gate field-effect transistor (JFET) is one of the simplest types of field-effect transistor. JFETs are three-terminal semiconductor devices that can be used as electronically controlled switches or resistors, or to build amplifier ...
s and HFETs. New models can be added to the simulator using: * Behavioral modeling: Internal B-, E-, and G-sources, as well as R, C and L devices, offer modeling by mathematical expressions, driven by node voltages, branch currents, parameters and constants. * The Xspice codemodel interface: This is a C-code interface that helps the modeling process by simplifying the access to simulator's internal structure. * ADMS verilog model compiler: The ADMS model compiler generates C code from Verilog-A model descriptions for integration into ngspice. * C language coded models with spice format: As an open-source project, Ngspice allows new models to be linked to the sources and compiled.


Netlists

Ngspice supports parametric netlists (i.e. netlists can contain parameters and expressions).
PSPICE OrCAD Systems Corporation was a software company that made OrCAD, a proprietary software tool suite used primarily for electronic design automation (EDA). The software is used mainly by electronic design engineers and electronic technicians to ...
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.


Defining new models

For mixed signal circuit simulation 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 C (''pronounced like the letter c'') is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities o ...
with macroses which is compiled by standard C/C++ compilers.


Development

Ngspice may be compiled into
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

another shared library version, offers an interface to
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company **TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
/
Tk (software) Tk is a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages. Tk provides a number of widgets commonly needed t ...
for better integration with software like XCircuits. Ngspice is licensed under the BSD-3-Clause license. This permissive open source license allows its integration as a simulation engine into several —
proprietary {{Short pages monitor