-
Notifications
You must be signed in to change notification settings - Fork 66
/
Stuarts_Poly_Notes
103 lines (69 loc) · 3.31 KB
/
Stuarts_Poly_Notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
SPICE 2 POLY CODEMODEL
WARNING!
The text in this document has been prepared in 2003 and is outdated. It is
provided here only for reference and may provide some (historical)
information.
SPICE2 POLY attributes are now available for controlled sources. To
use POLY attributes, configure tclspice/ngspice with the
--enable-xspice flag set as described above. After compilation of
ngspice, cd into $(top_srcdir)/src/xspice/icm and read the README file
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
Makefiles before you can do "make && make install" of the codemodel
stuff.)
-- SDB 6.22.2003.
--------------------------------------------------------------------
COMPILING XSPICE CHANGES
The dependencies in the Makefile don't seem to work when you are
compiling changes in the xspice stuff. Obviously, the best thing to
do is fix Makefile.am, but since I am not an expert at this, I have
been using the following workaround when making:
touch src/main.c && make && make install
I recommend you also do this if you hack anything under src/xspice.
-- SDB 6.19.2003.
---------------------------------------------------------------------
DEBUGGING SPICE
To avoid a segmentation fault in the initial run, use the following
command in gdb:
setenv SPICE_NO_DATASEG_CHECK "1"
Or, the comparable command in your shell before running gdb. This
disable accurate tracking of how much memory is used.
----------------------------------------------------------------------
USING A GARBAGE COLLECTOR
Get the Boehm-Weiser conservative garbage collector at the following
address:
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Compile it with 'make liblinuxgc.so' and install libgc.so and gc.h
where the compiler can find them (i.e., /usr/local/lib and
/usr/local/include). Run configure and compile.
----------------------------------------------------------------------
CREATING PATCHES
If you don't have access to anonymous CVS:
# extract the differences
$ diff -ruN ng-spice-rework-x ng-spice > my.patch
where ng-spice-rework-x is the snapshot you used to base your changes
on.
If you do have access to anonymous CVS:
$ cvs diff -u > my.patch
Note: this only works if you haven't added any files. Otherwise, the
first method is better.
Now, send your patch to ng-spice mailing list.
----------------------------------------------------------------------
INCORPORATING PATCHES
# apply the patch
$ patch -p1 < my.patch
# update the automatically generated files
$ sh autogen.sh
----------------------------------------------------------------------
INCOMPATIBILITIES BETWEEN SPICE3 AND SPICE2
The output format of spice3 is slightly different for .print and .plot
lines. Most notably, different traces on plots are not scaled
independently. This is most noticeable on phase/magnitude plots from
an AC analysis (also, phase is displayed in radians). Finally,
frequency for ".PRINT AC" lines is displayed as a complex quantity
with an all-zero imaginary component.
For input, "POLY( )" sources are not supported (the non-linear
dependent source provides a more general replacement). Also, the
".ALTER" line is not supported. The Spice3 parser may be slightly
different on subtle points of reading input (lines need not start at
column 1 for instance).