You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Francesco Lannutti fe89da2b2c Getting rid of SPARSE for Initial Circuit Matrix creation. Now KLU is totally independent from SPARSE. This opens up the interface for other solvers as well 6 years ago
..
cm First attempt of KLU support for XSPICE 3 years ago
cmpp First attempt of KLU support for XSPICE 3 years ago
enh XSPICE is in the public domain. 6 years ago
evt Set brackets to remove gcc compiler warning 3 years ago
examples examples moved to examples/xspice/original-examples 8 years ago
icm First attempt of KLU support for XSPICE 3 years ago
idn Change output event setup in evtload.c so that, when making an event call 3 years ago
ipc Remove compiler warnings (writ_ifs.c ipcsockets.c). 4 years ago
mif Getting rid of SPARSE for Initial Circuit Matrix creation. Now KLU is totally independent from SPARSE. This opens up the interface for other solvers as well 3 years ago
.gitignore .gitignore files 14 years ago
Makefile.am xspice/icm/table, introduce table2d/table3d 9 years ago
README update `making xspice' within actual ngspice 14 years ago
xspice.c First attempt of KLU support for XSPICE 3 years ago

README

ngspice Xspice code model support.
2012 05 06
--------------------------------------

Use configure the flag --enable-xspice to compile xspice support in,
when you run the ./configure script.
This creates a new command, "codemodel", which you can
use to load a codemodel.

The command codemodel attempts to load all the codemodels specified in the
arguments, eg
"ngspice 1 ->codemodel /usr/lib/ngspice/analog.cm /usr/lib/ngspice/spice2poly.cm"

( note: the codemodel path must begin with ./ or / to work )

The codemodels are automatically compiled and then installed in
${prefix}/lib/ngspice/ when ngspice is installed.

To create your own codemodels:

* Unpack the ngspice source and compile as normal.

* cd src/xspice/icm

* make the directory structure for the new library:
Create the nested library_name and module_name directories and copy the
source code to the module_name directories

src/xspice/icm/ <library_name> /
modpath.lst udnpath.lst
<module_name> /
files:
cfunc.mod ifspec.ifs ( for a device )
or
udnfunc.c ( or a user defined node )

* For each library create the files modpath.lst and udnpath.lst, which
contain a list of the user devices and nodes respectivily, in the location
shown above.

* Edit src/xspice/icm/makedefs.in and alter the CMDIRS line to include
your library directory.

* Run make in the src/xspice/icm directory. ( the makefile does the rest )

The codemodel can be then found in
src/xspice/icm/<library_name>/<library_name>.cm


-----------------------------------------
SPICE2 POLY codemodel support.

SPICE2 POLY attributes are now available for controlled sources.

To use POLY attributes, configure and install ( make install )
ngspice with the --enable-xspice flag set as described above.

After compilation of ngspice edit
${prefix}/share/tclspice/scripts/spinit or
${prefix}/share/ngspice/scripts/spinit
( depending if you included tcl support or not )

and uncomment the
"* codemodel /usr/lib/spice/spice2poly.cm"
line and edit as required. ( the path to spice2poly.cm may be wrong )
( alternativily create a ~/.spiceinit file with the above codemodel line )

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 direct questions/comments/complaints to the ngspice user's list
or forum.