ngspice/INSTALL

703 lines
24 KiB
Plaintext
Raw Normal View History

2008-11-06 10:22:54 +01:00
Ngspice installation instructions
=================================
2008-11-06 10:22:54 +01:00
Table of contents
2012-01-27 23:24:00 +01:00
1 Ngspice installation (LINUX)
2008-11-06 10:22:54 +01:00
1.1 Prerequisites
2017-08-23 23:48:28 +02:00
1.2 Install from tarball (e.g. ngspice-27.tar.gz)
1.3 Install from git repository
2008-11-06 10:22:54 +01:00
1.4 Advanced Install
2011-05-28 21:33:35 +02:00
1.4.1 Most useful options
1.4.2 Options Specific to Using Ngspice
1.4.3 Options Useful for Debugging Ngspice
2008-11-06 10:22:54 +01:00
2 Compilers and Options
3 Compiling For Multiple Architectures
4 Installation Names
5 Optional Features
6 Specifying the System Type
7 Sharing Defaults
8 Operation Controls
9 NGSPICE COMPILATION UNDER WINDOWS OS
2008-11-29 23:50:23 +01:00
9.1 How to make ngspice with MINGW and MSYS
2017-08-23 23:48:28 +02:00
9.2 make ngspice with MS Visual Studio 2015/2017
2008-11-06 10:22:54 +01:00
9.3 make ngspice with pure CYGWIN
2012-01-27 23:24:00 +01:00
9.4 ngspice console app with MINGW or CYGWIN
2017-08-23 23:48:28 +02:00
10 NGSPICE COMPILATION UNDER MAC OS X
2008-11-06 10:22:54 +01:00
This file describes the procedures to install ngspice from sources.
2012-01-27 23:24:00 +01:00
1 Ngspice Installation (LINUX, maybe others)
2008-11-06 10:22:54 +01:00
====================
2008-11-06 10:22:54 +01:00
1.1 Prerequisites
2017-08-23 23:48:28 +02:00
Ngspice is written in C and thus a complete C compilation environment
is needed. Almost any LINUX offers a complete C development environment.
2014-01-04 15:42:57 +01:00
Ngspice is developed on GNU/Linux with gcc and GNU make.
2008-11-06 10:22:54 +01:00
2014-01-04 15:42:57 +01:00
The following software must be installed in your system to compile ngspice:
bison, flex, and X11 headers and libs.
2008-11-06 10:22:54 +01:00
If you want to compile the source from the git repository you need
2014-01-04 15:42:57 +01:00
additional software: autoconf, automake, libtool, texinfo, readline.
2008-11-06 10:22:54 +01:00
The following software may be needed when enabling additional features:
editline, tcl/tk, adms
2014-01-04 15:42:57 +01:00
Please have a look at the actual ngspice manual, downloadable at
http://ngspice.sourceforge.net/docs.html, which gives you much more
information on ngspice and its usage.
2014-01-04 15:42:57 +01:00
2017-08-23 23:48:28 +02:00
1.2 Install from tarball (e.g. ngspice-27.tar.gz)
2014-01-04 15:42:57 +01:00
This covers installation from a release distribution (for example
2017-08-23 23:48:28 +02:00
ngspice-27.tar.gz, the so called tar ball).
2014-01-04 15:42:57 +01:00
After downloading the tar ball to a local directory unpack it using:
2017-08-23 23:48:28 +02:00
$ tar -zxvf ngspice-27.tar.gz
2014-01-04 15:42:57 +01:00
Now change directories in to the top-level source directory (where this
INSTALL file can be found).
You should be able to do:
2014-01-04 15:42:57 +01:00
$ mkdir release
$ cd release
$ ../configure --with-x --with-readline=yes --disable-debug
$ make
$ sudo make install
2014-01-04 15:42:57 +01:00
The default install directory for executables is /usr/local/bin.
2014-01-04 15:42:57 +01:00
A simple ../configure might be sufficient for a basic ngspice, but the preferred
arguments to ../configure are
--with-x --with-readline=yes and --disable-debug
providing you with a comfortably working ngspice (see section 1.4 for details).
2014-01-04 15:42:57 +01:00
See the section titled 'Advanced Install' for instructions about additional arguments
that can be passed to ../configure to customise the build and installation.
Do not use the script ./autogen.sh, because it is not required for
compiling and installing ngspice from the tarball.
2014-01-04 15:42:57 +01:00
A fully featured ngspice on LINUX may be obtained with the following commands:
$ mkdir release
$ cd release
2014-01-04 15:42:57 +01:00
$ ../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp
$ make 2>&1 | tee make.log
$ sudo make install
2014-01-04 15:42:57 +01:00
To remove the executables and libraries from the install directory, you may call
$ sudo make uninstall
2014-01-04 15:42:57 +01:00
1.3 Install from the git repository
2011-05-28 21:33:35 +02:00
This section describes how to install from source code taken directly
from the git repository. It is intended for those who want to use the most
2014-01-04 15:42:57 +01:00
recent enhancements of ngspice and for developers. For user install
instructions using source from a released distributions, please see the
sections titled 'Install from tarball' and 'Advanced Install'.
Download ngspice sources from the git repository as described on the sourceforge project page
2014-01-04 15:42:57 +01:00
(see http://ngspice.sourceforge.net/download.html and click on the git link)
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
Now change directories in to the top-level source directory (where this
INSTALL file can be found).
2014-01-04 15:42:57 +01:00
The project uses the GNU build process. The compile output should go into a separate
directory, so to e.g. maintain separate debug and release versions.
2008-11-06 10:22:54 +01:00
$ ./autogen.sh
2011-05-28 19:35:56 +02:00
$ mkdir debug
$ cd debug
2014-01-04 15:42:57 +01:00
$ ../configure --with-x --with-readline=yes
2008-11-06 10:22:54 +01:00
$ make
$ sudo make install
2014-01-04 15:42:57 +01:00
See the section titled 'Advanced Install' for instructions about arguments
2008-11-06 10:22:54 +01:00
that can be passed to ./configure to customise the build and installation.
2014-01-04 15:42:57 +01:00
2010-06-20 12:04:50 +02:00
Preferred arguments to ./configure to obtain a comfortably working ngspice may be
2014-01-04 15:42:57 +01:00
--with-readline=yes and --disable-debug (for a smaller and speed optimized
2014-01-04 15:42:57 +01:00
executable).
2010-09-25 17:07:23 +02:00
A fully featured ngspice on LINUX may be obtained with the following commands:
$ ./autogen.sh --adms
2011-05-28 19:35:56 +02:00
$ mkdir release
$ cd release
2011-05-28 21:33:35 +02:00
$ ../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp --enable-adms
2011-05-28 19:35:56 +02:00
$ make 2>&1 | tee make.log
2010-09-25 17:07:23 +02:00
$ sudo make install
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
If a problem is found with the build process, please submit a report to
the ngspice development team. Please provide information about your system
2014-01-04 15:42:57 +01:00
and any ./configure arguments you are using, together with any error
2008-11-06 10:22:54 +01:00
messages. Ideally you would have tried to fix the problem yourself first.
2014-01-04 15:42:57 +01:00
If you have fixed the problem then the development team will love to hear
2008-11-06 10:22:54 +01:00
from you.
2014-01-04 15:42:57 +01:00
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
1.4 Advanced Install
2008-11-06 10:22:54 +01:00
Some extra options can be provided to './configure'. To get all available
options do:
2008-11-06 10:22:54 +01:00
$ ./configure --help
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
Some of these options are generic to the GNU build process that is used by
Ngspice, other are specific to Ngspice.
2008-11-06 10:22:54 +01:00
The following sections provide some guidance and descriptions for many,
but not all, of these options.
2014-01-04 15:42:57 +01:00
2011-05-28 19:35:56 +02:00
1.4.1 Most useful options:
2011-05-28 21:33:35 +02:00
--enable-adms
2014-01-04 15:42:57 +01:00
ADMS is an experimental model compiler that translates
Verilog-A compact models into C code that can be compiled into
2017-08-23 23:48:28 +02:00
ngspice. This is (as of ngspice-27) still experimental, some
2011-05-28 21:33:35 +02:00
features (e.g. noise) are missing. If you want to use it, please
2014-01-04 15:42:57 +01:00
refer to the ADMS section on ngspice web site.
2011-05-28 19:35:56 +02:00
--enable-cider
Cider is a mixed-level simulator that couples Spice3 and DSIM
2011-05-28 21:33:35 +02:00
to simulate devices from their technological parameters.
2014-01-04 15:42:57 +01:00
2011-05-28 19:35:56 +02:00
--enable-xspice
2011-05-28 21:33:35 +02:00
Enable XSpice enhancements,
2014-01-04 15:42:57 +01:00
A mixed signal simulator built upon spice3 with codemodel
2011-05-28 21:33:35 +02:00
dynamic loading support. See the ngspice manual for details.
2014-01-04 15:42:57 +01:00
2011-05-28 21:33:35 +02:00
--with-readline=yes
2011-05-28 19:35:56 +02:00
Enable GNU readline support for the command line interface.
2014-01-04 15:42:57 +01:00
--enable-openmp
Compile ngspice for multi-core processors.
2011-05-28 21:33:35 +02:00
Parallelization is done by OpenMP, for MOS models in BSIM3.3.0
2014-01-04 15:42:57 +01:00
BSIM4.6.0 and and BSOI4 only. See the ngspice manual for details.
2011-05-28 21:33:35 +02:00
--disable-debug
This option will remove the '-g' option passed to the compiler
2014-01-04 15:42:57 +01:00
and add -O2 optimisation (instead of default O0).
This speeds up simulating significantly, and is recommended for
2011-05-28 21:33:35 +02:00
normal use.
2014-01-04 15:42:57 +01:00
2011-05-28 19:35:56 +02:00
1.4.2 Options Specific to Using Ngspice
2014-01-04 15:42:57 +01:00
Most of the options now following are not well maintained, are not tested or even maybe obsolete.
2008-11-06 10:22:54 +01:00
--enable-capbypass
2014-01-04 15:42:57 +01:00
Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd
2011-05-28 19:35:56 +02:00
voltages are unchanged.
2008-11-06 10:22:54 +01:00
--enable-cluster
Clustering code for distributed simulation. This is a
contribution never tested. This code comes from TCLspice
implementation and is implemented for transient analysis only.
2014-01-04 15:42:57 +01:00
--enable-expdevices
Enable experimental devices. This option is used by developers
2008-11-06 10:22:54 +01:00
to mask devices under development. Almost useless for users.
--enable-experimental
2011-05-28 19:35:56 +02:00
This enables some experimental code. Specifically it enables:
2014-01-04 15:42:57 +01:00
* The ability to save and load snapshots: adds
2011-05-28 19:35:56 +02:00
interactive keywords 'savesnap' and 'loadsnap'.
2008-11-06 10:22:54 +01:00
2014-01-04 15:42:57 +01:00
--enable-help
2008-11-06 10:22:54 +01:00
Force building nghelp. This is deprecated.
2007-05-01 05:41:59 +02:00
2008-11-06 10:22:54 +01:00
--enable-ndev
2011-05-28 21:33:35 +02:00
Enable NDEV interface, (experimental, needs updating)
2011-05-28 19:35:56 +02:00
A TCP/IP interface to external device simulator such as GSS.
2014-01-04 15:42:57 +01:00
For more information, please visit the homepage of GSS at
2011-05-28 19:35:56 +02:00
http://gss-tcad.sourceforge.net
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-newpred
Enable the NEWPRED symbol in the code.
2007-05-01 05:41:59 +02:00
2008-11-06 10:22:54 +01:00
--enable-newtrunc
2011-05-28 19:35:56 +02:00
Enable the newtrunc option
2008-11-06 10:22:54 +01:00
--enable-nodelimiting
2011-05-28 19:35:56 +02:00
Experimental damping scheme
2008-11-06 10:22:54 +01:00
--enable-nobypass
2011-05-28 19:35:56 +02:00
Don't bypass recalculations of slowly changing variables
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-predictor
2011-05-28 19:35:56 +02:00
Enable a predictor method for convergence
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-sense2
2011-05-28 19:35:56 +02:00
Use spice2 sensitivity analysis
2008-11-06 10:22:54 +01:00
--enable-xgraph
2011-05-28 19:35:56 +02:00
Compile the Xgraph plotting program.
Xgraph is a plotting package for X11 and was once very popular.
2008-11-06 10:22:54 +01:00
--with-editline=yes
2011-05-28 19:35:56 +02:00
Enables the use of the BSD editline library (libedit).
See http://www.thrysoee.dk/editline/
2008-11-06 10:22:54 +01:00
--with-tcl=tcldir
2014-01-04 15:42:57 +01:00
When configured with this option the tcl module
2010-06-24 13:10:36 +02:00
"tclspice" is compiled and installed instead of
plain ngspice.
2013-04-14 00:36:11 +02:00
--with-ngshared
This option let you compile ngspice as a shared
library or dll, allowing an application controlling
ngspice. This option excludes using --with-x or
--with-wingui. Useful additional options are
--enable-xspice --enable-cider --enable-openmp.
No graphics inetrface is provided, this has to be
handled by the controlling application.
2014-01-04 15:42:57 +01:00
2011-05-28 19:35:56 +02:00
1.4.3 Options Useful for Debugging Ngspice
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
--enable-ansi
2014-01-04 15:42:57 +01:00
Configure will try to find an option for your compiler so that
2011-05-28 19:35:56 +02:00
it expects ansi-C.
2008-11-06 10:22:54 +01:00
--enable-asdebug
2011-05-28 19:35:56 +02:00
Debug sensitivity code *ASDEBUG*.
2008-11-06 10:22:54 +01:00
2014-01-04 15:42:57 +01:00
--enable-blktmsdebug
Debug distortion code *BLOCKTIMES*
2008-11-06 10:22:54 +01:00
--enable-checkergcc
2011-05-28 19:35:56 +02:00
Option for compilation with checkergcc.
2008-11-06 10:22:54 +01:00
--enable-cpdebug
2011-05-28 19:35:56 +02:00
Enable ngspice shell code debug.
2008-11-06 10:22:54 +01:00
--disable-debug
2011-05-28 19:35:56 +02:00
This option will remove the '-g' option passed to the compiler.
2014-01-04 15:42:57 +01:00
This speeds up compilation a *lot*, and is recommended for
2011-05-28 19:35:56 +02:00
normal use.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
--enable-ftedebug
2011-05-28 19:35:56 +02:00
Enable ngspice frontend debug.
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-gc
2011-05-28 19:35:56 +02:00
Enable the Boehm-Weiser Conservative Garbage Collector.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
--enable-pzdebug
2011-05-28 19:35:56 +02:00
Debug pole/zero code.
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-sensdebug
Debug sensitivity code *SENSDEBUG*.
--enable-smltmsdebug
2011-05-28 19:35:56 +02:00
Debug distortion code *SMALLTIMES*
2008-11-06 10:22:54 +01:00
--enable-smoketest
2011-05-28 19:35:56 +02:00
Enable smoketest compile.
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
--enable-stepdebug
2011-05-28 19:35:56 +02:00
Turns on debugging of convergence stepping??
2014-01-04 15:42:57 +01:00
2008-11-06 10:22:54 +01:00
2 Compilers and Options
=====================
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
Or on systems that have the `env' program, you can do it like this:
2000-04-27 22:03:57 +02:00
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
2008-11-06 10:22:54 +01:00
3 Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
4 Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
2005-10-15 15:59:27 +02:00
2008-11-06 10:22:54 +01:00
When installed on MinGW with MSYS alternative paths are not fully supported.
See 'How to make ngspice with MINGW and MSYS' below for details.
2005-10-15 15:59:27 +02:00
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
5 Optional Features
=================
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
6 Specifying the System Type
==========================
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
7 Sharing Defaults
================
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
8 Operation Controls
==================
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`configure' recognizes the following options to control how it
operates.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`--help'
Print a summary of the options to `configure', and exit.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
2000-04-27 22:03:57 +02:00
2008-11-06 10:22:54 +01:00
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
2002-01-03 23:44:21 +01:00
2008-11-06 10:22:54 +01:00
`configure' also accepts some other, not widely useful, options.
2002-01-03 23:44:21 +01:00
2008-11-06 10:22:54 +01:00
9 NGSPICE COMPILATION UNDER WINDOWS OS
====================================
2002-01-03 23:44:21 +01:00
2008-11-29 23:50:23 +01:00
9.1 How to make ngspice with MINGW and MSYS
2014-01-04 15:42:57 +01:00
2012-01-27 23:24:00 +01:00
Creating ngspice with MINGW is a straight forward procedure,
2014-01-04 15:42:57 +01:00
if you have MSYS/MINGW installed properly. You will need some enhancements
to the standard install (FLEX and BISON have to be made available in MSYS).
Some links are given below which describe the procedures.
2017-08-23 23:48:28 +02:00
Installing from the tarball, e.g. ngspice-27.tar.gz, is now simple: After
expanding, you may just run ./compile_min.sh from the ngspice-27 directory.
2014-01-04 15:42:57 +01:00
2008-11-29 23:50:23 +01:00
The default installation location of ngspice is the Windows path
C:\spice. The install path can be altered by passing --prefix=NEWPATH
as an argument to ./configure during the build process.
2014-01-04 15:42:57 +01:00
Put the install path you desire inside "", e.g. "D:/NewSpice". Be
careful to use forward slashes "/", not backward slashes "\" (something
still to be fixed). Then add --prefix="D:/NewSpice" as an argument to
2008-11-29 23:50:23 +01:00
./configure in the normal way.
The procedure of compiling a distribution (for example, a tarball from
the ngspice website), is as follows:
2017-08-23 23:48:28 +02:00
$ cd ngspice-27
$ mkdir release
$ cd release
2013-03-23 13:00:30 +01:00
$ ../configure --with-wingui ...and other options
2008-11-29 23:50:23 +01:00
$ make
$ make install
2014-01-04 15:42:57 +01:00
The most useful options are:
2012-01-27 23:24:00 +01:00
--enable-xspice
2008-11-29 23:50:23 +01:00
--enable-cider
--disable-debug (-O2 optimization, no debug information)
2014-01-04 15:42:57 +01:00
2010-09-25 17:07:23 +02:00
A fully featured ngspice on Windows may be obtained with the following commands:
$ ./autogen.sh --adms
2011-06-02 10:58:30 +02:00
$ mkdir release
$ cd release
2013-03-23 13:00:30 +01:00
$ ../configure --with-wingui --enable-cider --disable-debug --enable-openmp --enable-xspice --enable-adms
2010-09-25 17:07:23 +02:00
$ make install
2014-01-04 15:42:57 +01:00
However, to compile code extracted from the git repository the procedure is
2014-01-04 15:42:57 +01:00
a little different. Firstly install git, e.g. from http://git-scm.com/download/win
To obtain ngspice, you may do the following:
2014-01-04 15:42:57 +01:00
2014-01-04 15:42:57 +01:00
Open the git command window. Go to a directory of your choice, e.g. D:\Spice
$ cd /d/Spice
Issue the command for downloading ngspice:
$ git clone git://ngspice.git.sourceforge.net/gitroot/ngspice/ngspice
2014-01-04 15:42:57 +01:00
This will create directory /ngspice .
Go to directory ngspice
$ cd /d/Spice/ngspice
Start compiling, e.g. by calling
$ ./autogen.sh --adms
$ ./compile_min.sh
Update the ngspice files:
Go to directory ngspice
$ cd /d/Spice/ngspice
Issue command for update
$ git pull
2008-11-29 23:50:23 +01:00
2014-01-04 15:42:57 +01:00
Instead of calling ./compile_min.sh, you may choose to issue
individual commands like:
$ cd ngspice
2008-11-29 23:50:23 +01:00
$ ./autogen.sh
2011-06-02 10:58:30 +02:00
$ mkdir release
$ cd release
2013-03-23 13:00:30 +01:00
$ ../configure --enable-maintainer-mode --with-wingui ...and other options
2008-11-29 23:50:23 +01:00
$ make
$ make install
2014-01-04 15:42:57 +01:00
MINGW and MSYS can be downloaded from http://www.mingw.org/. The making of
ngspice and the code models *.cm for XSpice requires installation of BISON
2012-01-27 23:24:00 +01:00
and FLEX to MSYS. A typical installation was tested with:
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
bison-2.0-MSYS.tar.gz
flex-2.5.4a-1-bin.zip
libiconv-1.9.2-1-bin.zip
libintl-0.14.4-bin.zip
2014-01-04 15:42:57 +01:00
Bison 2.0 is now superseeded by newer releases (Bison 2.3, see
2009-09-20 22:28:12 +02:00
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879)
2014-01-04 15:42:57 +01:00
The last three are from
2009-09-20 22:28:12 +02:00
http://sourceforge.net/project/showfiles.php?group_id=23617.
2014-01-04 15:42:57 +01:00
Installing from git needs more packages to MSYS in advance:
git, automake, autoconf, libtool
2009-09-20 22:28:12 +02:00
2014-01-04 15:42:57 +01:00
You may also look at
2008-11-29 23:50:23 +01:00
http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite
http://www.mingw.org/wiki/MSYS
2009-09-20 22:28:12 +02:00
http://www.mingw.org/wiki/HOWTO_Create_an_MSYS_Build_Environment.
2014-01-04 15:42:57 +01:00
An alternative compiler setup is available at
http://tdm-gcc.tdragon.net/
2008-11-29 23:50:23 +01:00
9.2 make ngspice with MS Visual Studio 2008
2017-08-23 23:48:28 +02:00
ngspice may be compiled with MS Visual Studio 2015 or newer.
2009-09-20 22:28:12 +02:00
2017-08-23 23:48:28 +02:00
CIDER and XSPICE are included, the code models for XSPICE
(*.cm) are made as well.
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
There is currently no installation procedure provided, you may
however install the executable manually as described in the
installation tree below.
2014-01-04 15:42:57 +01:00
The directory (visualc) with its files
2009-09-20 22:28:12 +02:00
vngspice.sln (project starter) and
vngspice.vcproj (project contents)
2017-08-23 23:48:28 +02:00
allows to compile and link ngspice with MS Visual Studio 2015.
2014-01-04 15:42:57 +01:00
Newer Visual Studio versions will translate the project files
2017-08-23 23:48:28 +02:00
into their compatible format (tested with MS Visual Studio 2017).
You may however deny the translation and compile in a VS 2015
compatibility mode.
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
/visualc/include contains a dedicated config.h file. It contains the
preprocessor definitions required to properly compile the code.
strings.h has been necessary during setting up the project.
2014-01-04 15:42:57 +01:00
2017-08-23 23:48:28 +02:00
Install Microsoft Visual Studio 2017 Community with C/C++. For
example the German edition is available at no cost from
https://www.visualstudio.com/de/vs/community/.
2014-01-04 15:42:57 +01:00
Goto /ngspice/visualc.
2014-01-04 15:42:57 +01:00
2017-08-23 23:48:28 +02:00
Start MS Visual Studio 2017 by double click onto vngspice.sln.
2014-01-04 15:42:57 +01:00
After MS Visual Studio has opened up, select debug or release version
2009-09-20 22:28:12 +02:00
by checking 'Erstellen' , 'Konfigurations-Manager' 'Debug' or 'Release'.
2014-01-04 15:42:57 +01:00
Start making ngspice (called vngspice.exe) by selecting 'Erstellen' and
2009-09-20 22:28:12 +02:00
'vngspice neu erstellen'.
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
Object files will be created and stored in visualc/debug or visualc/release.
The executable will be stored to visualc/debug/bin or visualc/release/bin.
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
An installation tree (as provided with MINGW make install) and also used by
vngspice is (maybe created manually):
2014-01-04 15:42:57 +01:00
2009-09-20 22:28:12 +02:00
C:\Spice\
2011-05-28 19:35:56 +02:00
bin\
ngspice.exe
nghelp.exe
ngmakeidx.exe
ngnutmeg.exe
cmpp.exe
lib\
spice\
analog.cm
digital.cm
spice2poly.cm
extradev.cm
extravt.cm
share\
info\
dir
ngspice.info
ngspice.info-1
..
ngspice.info-10
man\
man1\
cmpp.1
ngmakeidx.1
2011-05-28 19:35:56 +02:00
ngmultidec.1
ngnutmeg.1
ngproc2mod.1
2011-05-28 19:35:56 +02:00
ngsconvert.1
ngspice.1
ngspice\
2011-05-28 19:35:56 +02:00
helpdir\
ngspice.idx
ngspice.txt
scripts\
ciderinit
devaxis
devload
setplot
spectrum
spinit
2014-01-04 15:42:57 +01:00
2008-11-29 23:50:23 +01:00
If you intend to install vngspice into another directory, e.g. D:\MySpice,
you have to edit /visualc/include/config.h and alter the entries:
#define NGSPICEBINDIR "C:/Spice/bin"
#define NGSPICEDATADIR "C:/Spice/share/ngspice"
2008-11-29 23:50:23 +01:00
to
#define NGSPICEBINDIR "D:/MySpice/bin"
2014-01-04 15:42:57 +01:00
#define NGSPICEDATADIR "D:/MySpice/share/ngspice"
2008-11-29 23:50:23 +01:00
If the code model files *.cm are not available, you will get warning messages,
2014-01-04 15:42:57 +01:00
but you may use ngspice in the normal way (of course without XSPICE extensions).
2008-11-29 23:50:23 +01:00
2002-01-03 23:44:21 +01:00
2008-11-29 23:50:23 +01:00
9.3 make ngspice with pure CYGWIN
2014-01-04 15:42:57 +01:00
If you don't have libdl.a you may need to link libcygwin.a
2008-11-29 23:50:23 +01:00
to libdl.a symbolically.
for example:
$ cd /lib
$ ln -s libcygwin.a libdl.a.
The procedure of compiling is the same as Linux.
2012-01-27 23:24:00 +01:00
9.4 ngspice console app with MINGW or CYGWIN
2014-01-04 15:42:57 +01:00
Omitting the configure flag --with-wingui will yield a console ngspice.
You then will not have any graphics interface. In CYGWIN you may add --with-x
2012-01-27 23:24:00 +01:00
for the X11 graphics (not available in mingw). A typical configure command
may look like
2014-01-04 15:42:57 +01:00
./configure --enable-adms --enable-xspice --enable-cider --enable-openmp
2012-01-27 23:24:00 +01:00
--disable-debug CFLAGS=-m32 LDFLAGS=-m32 prefix=C:/Spice
2012-10-20 19:49:10 +02:00
tested with TDM mingw.
2013-01-07 16:12:46 +01:00
10 NGSPICE COMPILATION UNDER MAC OS X
==================================
10.1 Use precompiled binary package
1. Install an X11 interface (like Xquartz)
2. Install the downloaded NGSPICE package
3. Open a terminal window and start using NGSPICE
10.2 Compile NGSPICE manually from a tarball
1. Install an X11 interface (like Xquartz)
2. Install MacPorts from http://www.macports.org
3. Execute this command:
sudo port install bison flex ncurses xorg-libXaw
4. Configure NGSPICE invoking "./configure". A complete set of feature is:
./configure --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no
5. Compile NGSPICE invoking "make"
6. Install NGSPICE invoking "make install" or "sudo make install"
10.3 Compile NGSPICE manually from git
1. Install an X11 interface (like Xquartz)
2. Install MacPorts from http://www.macports.org
3. Execute this command:
sudo port install automake autoconf libtool bison flex ncurses xorg-libXaw
4. Execute this command:
./autogen.sh or ./autogen.sh --adms (if you want to enable ADMS)
5. Configure NGSPICE invoking "./configure". A complete set of feature is:
./configure --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no
./configure --enable-adms --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no (if you want to enable ADMS)
6. Compile NGSPICE invoking "make"
7. Install NGSPICE invoking "make install" or "sudo make install"