Codemodel support update.
This commit is contained in:
parent
96b41c6a8f
commit
b1b0841625
13
ChangeLog
13
ChangeLog
|
|
@ -1,13 +1,19 @@
|
||||||
2004-01-10 Paolo Nenzi <p.nenzi@ieee.org>
|
2004-01-10 Paolo Nenzi <p.nenzi@ieee.org>
|
||||||
|
|
||||||
|
* src/Makefile.am Makefile.am README.Tcl
|
||||||
|
src/xspice/README src/xspice/icm/README
|
||||||
|
src/xspice/icm/spice2poly/icm_spice2poly/README:
|
||||||
|
Updated to reflect codemodel support is now complete
|
||||||
|
(Stefan Jones <stefan.jones@multigig.com>)
|
||||||
|
|
||||||
* src/xspice/ipc/ipc.c:
|
* src/xspice/ipc/ipc.c:
|
||||||
Remove linux specific includes which are not needed
|
Remove linux specific includes which are not needed
|
||||||
(Stefan Jones).
|
(Stefan Jones <stefan.jones@multigig.com>).
|
||||||
|
|
||||||
* src/xspice/{Makefile.am,xspice.c}
|
* src/xspice/{Makefile.am,xspice.c}
|
||||||
src/xspice/cm/{cmexport.c,Makefile.am}:
|
src/xspice/cm/{cmexport.c,Makefile.am}:
|
||||||
Moved the xspice library hooks into the cm directory
|
Moved the xspice library hooks into the cm directory
|
||||||
(Stefan Jones).
|
(Stefan Jones <stefan.jones@multigig.com>).
|
||||||
|
|
||||||
* src/xspice/enh/enhtrans.c src/xspice/mif/mif_inp2.c:
|
* src/xspice/enh/enhtrans.c src/xspice/mif/mif_inp2.c:
|
||||||
Fixed version from Stuart Brorson <sdb@cloud9.net>,
|
Fixed version from Stuart Brorson <sdb@cloud9.net>,
|
||||||
|
|
@ -17,7 +23,8 @@
|
||||||
for codemodel devices.
|
for codemodel devices.
|
||||||
|
|
||||||
* src/Makefile.am, src/ngspice.idx: removed ngspice.idx
|
* src/Makefile.am, src/ngspice.idx: removed ngspice.idx
|
||||||
and make it auto-generated and installed (Stefan Jones).
|
and make it auto-generated and installed
|
||||||
|
(Stefan Jones <stefan.jones@multigig.com>).
|
||||||
|
|
||||||
* src/frontend/aspice.c: Added #ifdef for SOLARIS.
|
* src/frontend/aspice.c: Added #ifdef for SOLARIS.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
SUBDIRS = doc src man tests
|
SUBDIRS = doc src man tests
|
||||||
|
|
||||||
EXTRA_DIST = FAQ acconfig.h autogen.sh NOTES contrib BUGS
|
EXTRA_DIST = FAQ acconfig.h autogen.sh NOTES BUGS AUTHORS ChangeLog \
|
||||||
|
DEVICES NEWS README
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
|
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
|
||||||
config.h.in config.sub configure install-sh \
|
config.h.in config.sub configure install-sh \
|
||||||
missing mkinstalldirs stamp-h.in ltconfig \
|
missing mkinstalldirs stamp-h.in ltconfig \
|
||||||
ltmain.sh depcomp
|
ltmain.sh
|
||||||
|
|
||||||
mrproper: maintainer-clean
|
mrproper: maintainer-clean
|
||||||
rm -f `find . -type f -name "*~" -print`
|
rm -f `find . -type f -name "*~" -print`
|
||||||
rm -f `find . -type f -name "*.orig" -print`
|
rm -f `find . -type f -name "*.orig" -print`
|
||||||
rm -f `find . -type f -name "*.rej" -print`
|
rm -f `find . -type f -name "*.rej" -print`
|
||||||
|
|
||||||
codemodels:
|
|
||||||
cd src/xspice/icm && make
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ EXTRA_DIST = ngspice.txt ngspice.idx spinit setplot spectrum @CIDERSCRIPTS@
|
||||||
|
|
||||||
helpdatadir = $(pkgdatadir)/helpdir
|
helpdatadir = $(pkgdatadir)/helpdir
|
||||||
|
|
||||||
helpdata_DATA = ngspice.idx ngspice.txt
|
helpdata_DATA = ngspice.txt ngspice.idx
|
||||||
|
|
||||||
initdatadir = $(pkgdatadir)/scripts
|
initdatadir = $(pkgdatadir)/scripts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,79 @@
|
||||||
Spice Opus / XSpice code model support.
|
Spice Opus / XSpice code model support.
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Use configure flag --enable-xspice to compile the support in,
|
Use configure the flag --enable-xspice to compile xspice support in,
|
||||||
when you run the ./configure script.
|
when you run the ./configure script.
|
||||||
This creates a new command, "codemodel", which you can
|
This creates a new command, "codemodel", which you can
|
||||||
use to load a codemodel.
|
use to load a codemodel.
|
||||||
|
|
||||||
Some codemodels are included in the xspice/lib directory
|
The command codemodel attempts to load all the codemodels specified in the
|
||||||
with some examples in xspice/examples, compiled for linux glibc.
|
arguments, eg
|
||||||
|
"ngspice 1 ->codemodel /usr/lib/spice/analog.cm /usr/lib/spice/spice2poly.cm"
|
||||||
|
|
||||||
Make sure the the library dir, xspice/lib, is in your LD_LIBRARY_PATH
|
( note: the codemodel path must begin with ./ or / to work )
|
||||||
enviromental variable, otherwise the libs will not be found!
|
|
||||||
|
|
||||||
To create codemodels go to http://www.fe.uni-lj.si/spice/welcome.html
|
The codemodels are automatically compiled and then installed in
|
||||||
and download their trial version of spice opus for the codemodel toolkit!
|
${prefix}/lib/spice/ when spice is installed.
|
||||||
|
|
||||||
TODO:
|
To create your own codemodels:
|
||||||
Intergrate the ipc stuff from XSpice.
|
|
||||||
Create ng-spice capacity to create codemodels (a perl script)
|
* Unpack the tclspice source and compile as normal.
|
||||||
Ngspice crashes when you try to plot a digital node
|
|
||||||
|
* 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
|
||||||
|
|
||||||
Stefan Jones
|
Stefan Jones
|
||||||
19/2/2002
|
20020219
|
||||||
|
Edited 20030831
|
||||||
|
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
SPICE2 POLY codemodel support.
|
SPICE2 POLY codemodel support.
|
||||||
|
|
||||||
SPICE2 POLY attributes are now available for controlled sources. To
|
SPICE2 POLY attributes are now available for controlled sources.
|
||||||
use POLY attributes, configure tclspice/ngspice with the
|
|
||||||
--enable-xspice flag set as described above. After compilation of
|
To use POLY attributes, configure and install ( make install-tcl )
|
||||||
ngspice, cd into $(top_srcdir)/src/xspice/icm and read the README file
|
tclspice/ngspice with the --enable-xspice flag set as described above.
|
||||||
there for instructions about how to get POLY support. (Hint: you have
|
|
||||||
to download some stuff from http://www.fe.uni-lj.si/ and edit the
|
After compilation of ngspice edit
|
||||||
Makefiles before you can do "make && make install" of the codemodel
|
${prefix}/share/tclspice/scripts/spinit or
|
||||||
stuff.)
|
${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 mailto:sdb@cloud9.net.
|
Please direct questions/comments/complaints to mailto:sdb@cloud9.net.
|
||||||
|
|
||||||
6.22.2003 -- SDB.
|
6.22.2003 -- SDB.
|
||||||
|
|
||||||
|
Edited on 20030831 by Stefan Jones
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue