ngspice/src/xspice/icm
Holger Vogt 0d86539638 Trim trailing spaces 2022-11-09 15:11:13 +01:00
..
analog Update on author 2022-10-22 13:29:48 +02:00
digital Trim trailing spaces 2022-11-09 15:11:13 +01:00
spice2poly Update on various licences for XSPICE code models 2020-10-10 12:22:12 +02:00
table Extend the output and partial derivatives of the output from the 2/3-D 2022-07-24 12:23:15 +02:00
xtradev Add a guard on parameter 'position', limit to 2022-10-22 13:31:38 +02:00
xtraevt enable parameter 'gain' 2021-02-21 16:48:28 +01:00
GNUmakefile.in We no longer want to install cmpp or other XSPICE files. 2021-01-23 12:43:51 +01:00
README Added .cvsignore files 2005-05-10 21:49:35 +00:00
dlmain.c Add two functions to the Code Model Library: cm_get_node_name() 2022-09-23 13:15:07 +02:00
dlmain.h XSPICE is in the public domain. 2020-10-10 12:21:22 +02:00
makedefs.in symbol visibility=hidden only in release mode 2018-10-27 11:06:16 +02:00

README

This directory holds a codemodel which enables ngspice to handle SPICE
2 POLY attributes on controlled sources.  In short, when a SPICE 2
netlist is read in, any controlled sources with POLY attributes are
translated into codemodel devices with an associated .model which
invokes spice2poly to evaluate the polynomial.  

To use this model, you need to do the following:

1.  Compile the rest of ngspice/tclspice in the usual way from the
base directory.  Make sure you do configure --enable-xspice when
configuring.

2.  Download and install SPICE Opus (available from
http://www.fe.uni-lj.si/).   From this you need the program cmpp, as
well as some of the include files.  

3.  Edit the Makefile in this directory and make the variable CMPPDIR
point to the base location of your Opus installation.  (Hint: I
place it in /usr/local/opus.)

4.  Edit the Makefile in the directory below (icm_spice2poly/) and
make the  variable CMPDIR point to the base location of your Opus
installation.   

5.  Do "make" in this directory.  The makefiles are set up
to do all the necessary stuff to turn the spice2poly sources into a
shared object named spice2poly.cm which you can load into ngspice.
(Alternatively, you can do "make codemodels" from $(top_srcdir); I
have included codemodels as a target which cd's into this directory
and does "make".)

6.  Read the codemodel into ngspice in the following way:

ngspice 1 -> codemodel /usr/local/lib/spice/spice2poly.cm

(Of course, you should point to the location where *you* built
spice2poly.cm!)  You might want to put this invocation into your
spinit file (which usually lives in $(top_srcdir)/src/).

7.  Then read in your SPICE netlist.  SPICE 2 POLY attributes in
controlled sources will be translated into .models invoking the
spice2poly codemodel.  You should be able to run ngspice and simulate
in the usual way!

----------------------------------------------------------------------
Please send any comments/questions/bug reports to:

Stuart Brorson
sdb@cloud9.net

-- SDB 6.19.2003