introduction, ideas, compiler warning fix
----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 108
hello,
I would like to introduce myself to the group and would like to become
a member of the ng-spice development team. I allready mailed manu
some of my remarks of compiling ng-spice under sun solaris and under
linux RH5.2. No real problems. I have also compiled Berkely Spice3f5
on Solaris and RH5.2, no problems either, but your make is very luxurious.
I have compared both versions with one-another, I find no difference
for now. Except for the window background color and the raw file
format, I compiled Berkeley with ASCCI format, yours is binary (how do
I control this in ng-spice?).
Both versions give segmentation violations for some of my "big" passive
circuits.
My background: I have a Bsc. in electronics and telecommunication and
I am currently working on a master's degree in electromagnetic compatibility.
I am still working on my thesis and I can only start to work on ngspice in the
new year. Until then I keep a low profile, I will fix my attention to
compiler warnings (the attached file is the first).
My interest is mainly in passive circuits, transmission lines, planar 2
dimensional lines, analog simulators, electromagnet theory, microelectronics,
buffer I/O design, MoM electromagnetic solvers, ...
I have worked on a method of moment (MoM) static solver for multiconductor
transmission lines which we use in house (+17000 lines in C).
I work for Agfa-Gevaert belgium, were I am responsible for EMC and signal
integrity. I work with project teams on printers, scanners, ... Some of
our high speed design are just beginning to come of ground (+100MHz off-chip).
I lack hands-on experience in non-linear stuff (mos, integrated cicuits, ..).
I use Spice alot in signal integrity work. We pay alot for licenses ...
Too much for what you get.
I have a good background in algorithms for analog simulation, however I
lack the handson expertise. In order to bring ng-spice to a good end I would
suggest the following list:
-1- remove the compiler warnings
-2- improve on the make and configuration?
-3- convert to Ansi-C (I remember that a conversion K&R C to Ansi-C exists, right?)
-3- remove current memory leaks
-4- have a look at subcircuit expansion, it does not always work
-5- think about a new front-end - pre-processor (.param, .global, ...), lexical stuff,
parsing, subckt expansion, scripting, ...
-6- work out and document kernel operation, find details of .op, .dc, .ac and .tran
-7- work out details and document component models: RLCK, sources, transmission lines, ..
-8- work out details and document on how to include new elements
-9- work out details and document sparse matrix package
-10- study algorithms for block sparse matrix codes, can we use the current code?
What about threading or MPI?
-11- and many other things for doing EMC analysis
I would like to keep working in C, I do not favour C++. With respect to rebuilding
the analog kernel from scratch or to use a new sparse matrix package I would advice
negative.
I have been searching for a sparse matrix package for network simulations, I have not
found one. Many sparse matrix packages are for matrix-matrix or matrix-vector
operations. In spice they use a sparse LU decomposition, the reordering has to
be done with care to minimize fill-ins during LU decomp. The Kundert matrix package
does just that and for the moment we can not do better. Another reason for not finding
these matrix packages is that they are well guarded by commercial simulator companies!
I think.
I have used viewspice (from viewlogic) in the past. However, they used the Berkeley
code with a front-end netlist generator and a post-processor. However, the
Berkeley code, which I obtained from Berkeley for $250, is just the same as viewspice
if you start it up from the command line. We paid about $20.000 for the license and
$7000 on anual fees!!! For that money they did not even remove the memory leaks.
Viewlogic does not have a team or knowledge to support the development of an
analog simulator kernel. The ng-spice team is now in the same position, I want to do
better and, I am convinced you are too!
I think that documentation of ng-spice of the front-end, parser, lexer, simulator
interface, analysis loops, models and components are very important to attract other
people to get enough momentum to get up and running. Please let us stick to the current
code. It is like decyphering a cross word puzzle, however, it is often easier to
make the puzzle than to solve it. In this case the making of the puzzle was quiet
complex, the solution is relative hard but there are rules laid down by the
algorithme and a resistor is almost equal in structure to a capacitor, except that
the latter is a dynamic element. The stamps will be a lookalike and the updating too, as
are many other things. It is but a small step to understanding an inductor after you
understand the capacitor, and so on ... Let's take small steps in order not to land
on our face.
In december I will be able to compare SmartSpice with Intusoft and berkeley
Spice on a Sun Workstation. This will give us a clear idea how good ng-spice
is compared to commercial simulators. If the difference in run time is smalll then
that is again a reason for sticking with the current code.
Two more questions: my company bought Spice3F5 for $250, the policy is that I
could distribute it within the whole company, but not to the outside. On the
Berkely site Spice3F4 is free available, but I can not find 3F5 there. Could this
be a problem?
About CVS. Who is responsible for the bug fixes? Is CVS similar to RCS (revision code
system), were you lock/unlock source files for bug changes. Does that mean I have
to log in on the ftp site and to lock/unlock source files for bug changes? Or do
we report bugs and it is the responsability of a single indivdual to do the fixes?
Sorry about the long mail. Have a nice weekend.
regards,
jan vercammen
----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: bug1.rep
X-Sun-Charset: us-ascii
X-Sun-Content-Lines: 26
*** BUG: compiler warning txfree: 15 oct 1999
*** reported by: jan vercammen
*** find in c and h files
[jvercamm@vam382 ng-spice-0.3]$ grep txfree $(cat clist)
./src/lib/misc/alloc.c:txfree(char *ptr)
[jvercamm@vam382 ng-spice-0.3]$ grep txfree $(cat hlist)
./src/lib/sparse/spdefs.h:#define FREE(ptr) { if ((ptr) != NULL) txfree((char *)(ptr)); (ptr) = NULL; }
./src/include/spice.h:#define tfree(x) (txfree(x), x = 0)
./src/include/spice.h:extern void txfree(char *ptr);
*** compile warning (single example)
./src/lib/ckt/cktdltm.c:40: warning: passing arg 1 of `txfree' from incompatible pointer type
*** solution
./src/lib/ckt/cktdltm.c uses tfree, which should be changed to:
./src/include/spice.h:#define tfree(x) (txfree((char *)(x)), x = 0)
*** effect: removes about 100 compile warnings. No other effects found. Segement violations
on large passive circuits still not removed
END of REPORT
Partial thread listing: