[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Ngspice vs. Gnucap vs. ???



Hello --

I've been following this discussion with some interest.  I've been
recently hacking gEDA's SPICE capabilities because I wanted to perform
simulations of circuits incorporating commercial components.  Lots of
companies (e.g. Analog Devices) offer SPICE models of their products;
it turned out that gnetlist couldn't handle these models easily.
Therefore, I took it upon myself to fix the netlister.  I have 
successfully hacked it so that it now works to my satisfaction with
commercial SPICE models.  This stuff looks like it will end up in
the next release of gEDA.  Meanwhile, you can look at my website for
the patches.  

After that, I cast about looking for SPICE simulators.  I installed
LTSpice on my machine & got it running under wine.  LTSpice is a great
program & I have been happily using it for a lot of my work.  It
offers a great GUI, and is happy to simulate using all the commercial
models which I have thrown at it.  If you just wanna do simulations &
don't want to hack code, then I recomend using LTSpice (under wine) with
"gnetlist -g spice-sdb" to netlist.

In my case, however, I wanted to try my hand at some of the Linux
native simulators.  I looked at the web pages for both ngspice and
gnucap. Both seemed to be dormant.  Another poster said that gnucap is
alive and well, as can be seen from the CVS.  This is not a valid
excuse IMHO.  The ordinary user (like myself) who just wants to solve
a problem doesn't want to root around the CVS to see if something is 
currently under development.  It doesn't take long to update a web
page; I  bet that many prospective developers simply go away if
the web page is stale 'cause it looks like the whole project is stale.

In any event, I settled upon using ngspice.  Allow me to make the
following remarks about it:

*  I decided to play with ngspice instead of gnucap because it
promised to be a re-write of good old SPICE.  I decided to overlook
the licencing issues (if there are any) 'cause I wanted straight SPICE
which would be comaptible with all the models I can get off the web.
I am not interested in a circuit simulator with a
"somewhat different" syntax.  I think one of the problems that free
(as in freedom) software has is that many people prefer to re-invent
the wheel, instead of building upon and improving pre-existing code.
I didn't want to do that myself.   Perhaps I am wrong about gnucap's
ability to handle SPICE syntax, but that was my conclusion at the time.

*  The last release of ngspice occurred in 2001 (ngspice-14).
However, development is continuing in the tclspice branch.  This
release aims to allow you to embed SPICE commands in TCL code.  This
enables you to do e.g. complex parametric sweeps, or write component
value optimizers easily.  I find this to be a very powerful and
desirable feature & think it is valuable enough to do some hacking in
order to acheive it.  Does gnucap offer this?

*  When I first tried using ngspice on some of my netlists, it barfed
immediately.  I posted an inquiry onto ngspice-devel & learned that
the parser was foobar & didn't handle several standard netlists well.
I wrote some patches for the netlister, and now it works much better.
The patches are now in tclspice-0.2.9 (the latest release), which you
can download from sourceforge.  

*  As a stand-alone program, ngspice/tclspice doesn't handle POLY
attributes well.  HOwever, hooks have been placed into tclspice so
that you can compile it with XSPICE support enabled.  XSPICE,
apparently, *does* handle PLOY attributes. The XSPICE code, however,
is alpha quality.  I have tried compiling XSPICE in, but haven't
gotten it to work well yet.  I am currently hacking XSPICE in the
hopes of getting it to work with my netlists.  I would welcome it if
greater minds than mine were also working on this problem. 


Comments?

Stuart