5.2 Configuring NGSPICE
Now that you have extracted all the files, you need to give values to compile
time variables and set the correct paths for libraries and include file. If
you have compiled other programs released in source form, you have probably
already faced the GNU Autoconf system. If you already know what
Autoconf is and how it works, you can safely skip the next paragraph.
GNU Autoconf is a package that automates the task of configuring source
code packages. Configuring a source code package means assigning desired
values to compile-time variables, something known as "customization", and
look at functions, libraries available on the host system to produce the
makefiles needed for compilation. As said, this is a very brief introduction
to the Autoconf package, if you want to know more, look at its documentation.
NGSPICE uses GNU Autoconf configuration tool. To configure the
package type: ./configure --help on the command prompt. The
list of available options will be shown. The list comprises "standard" options
(the one every Autoconf package has) and options specific to the NGSPICE
package. This chapter deals with the latter only, sending back the reader to
the GNU Autoconf documentation for the former.
The options specific to NGSPICE are:
- --enable-numaparam: Preliminary support for parameters expansion
in netlists. Numparam is a library that attach itself to a single point
in NGSPICE code and comes with its own documentation. Before using this
library you should look at library's documentation in src/frontend/numaparam
directory.
- --enable-ftedebug: This switch enables the code for debugging
the NGSPICE frontend. Developers who wish to mess with the frontend
should enable it (and set to
TRUE
the "debug" option). The
casual user has no gain in enabling this option.
- --enable-ansi: This switch forces
-ansi
option of the
for compilation. This is interesting only to developers cleaning the
NGSPICE code. Nore real use for the user.
- --enable-debug: Add
-g
option for compilation. This
options is enabled by default and should not be disabled since
debugging tools relies on it.
- --enable-checkergcc: When enabled, NGSPICE will use the
Checker package. Checker tracks down memory errors at runtime.
Again, this is useless for users.
- --enable-gc: When enabled, NGSPICE will use the Boehm-Weiser
Conservative Garbage Collector. The garbage collector library is not
provided with NGSPICE, you must download and install it separately. Most
distributions provide a binary package of this library.
- --enable-nosqrt: When enabled, the faster code using SQRT in
charge/capacitance calculations of bulk diodes, when the grading
coefficients have a vaule of .5, is switched off. I think there is
no need to enable it.
- --enable-nobypass: When enabled the bypass code is not
compiled in. Once enabled NGSPICE does not contain the code to bypass
recalculations of slowly changing variables. It is advisable to leave
this disabled since the bypass code does is used only if the "bypass"
option is set to
TRUE
at runtime.
- --enable-capbypass: When enabled the calculation of cbd/cbs
in the mosfets is bypassed ifvbs/vbd voltages were unchanged. Better
do not enable it if you are not sure of its implications.
- --enable-capzerobypass: When enabled all the calculations
cbd/cbs calculations if Czero is zero. It is safe to enable this
feature.
- --enable-nodelimiting: Enable some experimental code that
was intended to do Newton damping by nodes, rather than by branches
as is currently done. The flag just turns off the branch limiting code
in a couple of mosfets. Obviously, do not enable this if you are not
working with the limiting code.
- --enable-predictor: When this feature is enabled, NGSPICE
(like the orignal Spice3f) uses a predictor-corrector method for
the numerical integration package. This feature has never been tested
too much, so enabling it is NOT considered safe.
- --enable-newtrunc: When enabled, some unfinished (?) code to
do truncation error timestep control on node voltages (rather than on
charge in the devices) is activated. Casual users should not enable it.
- --enable-sense2: Use spice2 sensitivity analysis.
- --enable-sensdebug: Enables debug switch for sensitivity code.
- --enable-intnoise: If enabed, noise analysis produces an
additional plot: the integrated noise. Users should always enable this.
- --enable-smoketest: Enables some very restrictive compilation
flags. Useful only in development phase and, if enabled, probably
NGSPICE does not compile.
- --enable-experimental: It is possible that some untested code
is included in stable releases. If you want to experiment with new
untested features, enable this option.
- --enable-ekv: EKV is a device model not released in source
code form. If you have obtained the source code, you have to enable
this to have it compiled into NGSPICE.
- --with-readline: This option enables GNU Readline on NGSPICE.
Since NGSPICE license is incompatible with GPL (which covers Readline
library), the code is not included compiled into NGSPICE by default.
Caveat Emptor:
NGSPICE, like its father Spice3f5 cannot be considered a "black box", it is a
complex numerical software whose stability and correctness depends on many
parameters. Be sure to understand well what you enable/disable otherwise your
simulations may converge to a wrong value or do not converge at all.
Once chosen the options to enable/disable, you will have to issue the
configure command followed by the options you choose, like:
configure --enable-intnoise --enable-nobypass --enable-capzerobypass
If all goes well, all makefiles will be generated and the package is ready
to be compiled.