XSPICE in Ngspice for behavioral analog and event driven modeling

XSPICE is an extension to the ngspice circuit simulator that provides the ability to use code modeling techniques to add new models. The XSPICE code model library distributed with ngspice contains over 40 functional blocks including summers, multipliers, integrators, memristor, magnetics models, limiters, S-domain transfer functions, digital gates, digital storage elements, and a generalized digital state-machine.

What is the XSPICE mixed-signal simulation capability ?

Digital functions are simulated in XSPICE through an embedded event-driven algorithm added to the Ngspice core. This algorithm is coordinated with the analog simulation algorithm to provide fast and accurate simulation of mixed-signal circuits and systems. The event-driven algorithm supports a "User-Defined Node" capability allowing additional event-driven data types to be defined and used. XSPICE comes with a 12-state digital data type as well as a user-defined node library that includes 'real' and 'integer' types useful in simulating sampled-data systems such as Digital Signal Processing algorithms.

XSPICE distribution in Ngspice

XSPICE is fully integrated into Ngspice. The code models are grouped into several code model libraries. These are shared libraries *.cm (equivalent to *.so or *.dll), made during compilation with gcc.

Adding new models to the existing library or adding new libraries are straightforward. An example is given on the XSPICE and ngspice HOWTO page. Details are described in the actual Ngspice manual.

XSPICE Licensing

XSPICE sources and documentation are in the public domain.

About the authors

XSPICE was developed by Fred Cox, Bill Kuhn, and their colleagues at the Georgia Tech Research Institute, a unit of the Georgia Institute of Technology.

Original XSPICE source code from Georgia Tech

Due to the fact that the Georgia Tech XSPICE web page is no longer on-line, the original C sources are made available here.

Relevant Links

  • XSPICE and Ngspice HOWTO: XSPICE code model generation starter and example.
  • Ngspice manual: The actual ngspice manual, XSPICE is covered in chapts. 12 and 25 - 29.
  • XSPICE docs: The original XSPICE documentation from Georgia Tech.
  • Spice OPUS: XSPICE page for the Spice OPUS simulator.
  • ICAP/4: XSPICE for the ICAP/4 simulator.