Merge branch 'pre-master' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master

This commit is contained in:
dwarning 2021-01-05 09:35:06 +01:00
commit 65db0786ec
12 changed files with 101 additions and 134 deletions

View File

@ -1,6 +1,6 @@
Ngspice Licensing
Copyright (c) 2020 by ngspice team
Copyright (c) 2021 by ngspice team
All rights reserved.
license for this document: CC-BY-SA v4.0

37
DEVICES
View File

@ -29,9 +29,8 @@ Table of contents
6.1 DIO - Junction Diode
7. Bipolar devices
7.1 BJT - Bipolar Junction Transistor
7.2 BJT2 - Bipolar Junction Transistor
7.3 VBIC - Bipolar Junction Transistor
7.4 HICUM2 - Bipolar Model
7.2 VBIC - Bipolar Junction Transistor
7.3 HICUM2 - Bipolar Model
8. FET devices
8.1 JFET - Junction Field Effect transistor
9. HFET Devices
@ -343,30 +342,14 @@ will be updated every time the device specific code is altered or changed to ref
Dir: devices/bjt
Status:
Enhancements over the original model:
- Parallel Multiplier
- Temperature difference from circuit temperature
- Different area parameters for collector, base and emitter
7.2 BJT2 - Bipolar Junction Transistor
Ver: N/A
Class: Q
Level: 2
Dir: devices/bjt2
Status:
This is the BJT model written by Alan Gillespie to support lateral
devices. The model has been hacked by Dietmar Warning fixing some bugs
and adding some features (temp. dependency on resistors).
Enhancements over the original model:
- Parallel Multiplier
- Temperature dependency on rc,rb,re
- Temperature difference from circuit temperature
- Different area parameters for collector, base and emitter
- Support lateral PNP
7.3 VBIC - Bipolar Junction Transistor
7.2 VBIC - Bipolar Junction Transistor
Ver: N/A
Class: Q
@ -382,6 +365,18 @@ will be updated every time the device specific code is altered or changed to ref
Notes: This is the 4 terminals model, without excess phase and thermal
network.
7.3 HICUM 2 - Bipolar Junction Transistor for high frequency
Ver: 2.4
Class: Q
Level: 4 & 9
Dir: devices/hicum2
HICUM: HIgh CUrrent Model is a physics-based geometry-scalable compact
model for homo- and heterojunction bipolar transistors, developed by
the HICUM Group at CEDIC, University of Technology Dresden, Germany.
Web Site: https://www.iee.et.tu-dresden.de/iee/eb/hic_new/hic_intro.html
8. FET devices

60
FAQ
View File

@ -1,7 +1,7 @@
Ngspice F.A.Q.Version 2.5 (ngspice-33 release)
Ngspice F.A.Q.Version 2.6 (ngspice-34 release)
Maintained by Holger Vogt
Last update: 04-27-2020
Last update: 01-03-2021
This document contains the Frequently Asked Questions (and Answers)
for ngspice project.
@ -249,41 +249,41 @@
The latest version released is:
* ngspice-33 (released on 18/10/2020)
* ngspice-34 (released on 10/01/2021)
2.2. What are the latest features in the current release?
- New features:
+ try first storing the temporary file in user directory,
only then in current directory.
+ Add adding the ngspice icon to the MINGW executable.
+ Do not print tansient initial conditions, if uic is selected.
+ Enable node names with special characters like '/'.
+ Do not print "Units" on a graph, if unknown type or settype notype is given.
+ Unify batch mode and control mode raw file output.
+ Make PPerror message more verbose.
+ Make the pwl parameter r adjustable by .param.
+ Enable flags xdelta, ydelta for 'gnuplot' command.
+ Enable special characters for cpl model names and parameters.
+ New command 'cutout': Cut out part of each vector of the current tran plot
and copy into a new plot
+ Compatibility switches KiCad 'ki', and Spectre 'spe'
+ Remove vceo= and icrating= from bjt model cards.
+ The tests of cmaths function will be done only on request.
+ Add alternative temperature model for certain jfet parameters.
+ Add BJT Kull Quasi-Saturation model.
+ Improve self heating tempaerature handling in VDMOS model.
+ Use W/nf for selecting binning model.
+ Add wnflag as an instance parameter.
+ Add PSPICE compatible ISWITCH.
+ Add a limit capability to the code model aswitch.
+ Add a new code model pswitch.
+ Many conde updates not visible to the user, but enhancing stability
+ Improved VBIC model
+ Get the vector type automatically, if db, ph, cph are applied.
+ Enable finding 'spinit' if its path contains spaces.
+ Increase buffer size for command 'listing' to 4096 bytes.
+ Add compatibility modes for EAGLE (ea) and Spectre (spe).
+ Add parameter 'plain' to 'plot' command.
+ Add variables 'plainplot', 'plainwrite', 'plainlet'
+ Add RF bipolar model HICUM 2.4 to the ngspice C sources.
+ Add charge formulation for non-linear capacitors.
+ Remove outdated code from contrib and unsupported directories.
+ When installing ngspice executable, do not install the headers.
+ Add support for tc1, tc2, and m for behavioral resistors,
which use the B source internally.
+ Add supporting E_constant Vconst 0 TABLE {Max(V(DP)-V(GN),0)}=((20,120)).
+ Remove the XSPICE limitation of the current source flag "current".
+ Remove the XSPICE dependency of the phase parameter for the
independent current source.
+ Drastically reduce the memory requirements if there is a PDK with
a lot of binning models (e.g. the SkyWater PDK).
+ Update to admst: Enhance the Verilog A compatibility.
+ Add most recent PSP102, Mextram504, BSIMBULK, and BSIMCMG models
to the ngspice adms sources.
+ Model checking for BSIM4.5 will only write to file if an excursion
is detected (still to be added to the other BSIM models)
+ Many code updates not visible to the user, but enhancing stability
and efficiency
- Bug fixes:
+ many bugs fixed and code improvements (see bugs 484 and up)
+ many bugs fixed and code improvements (see bugs 523 and up)
+ memory leaks removed
@ -375,7 +375,7 @@
4.4. Disclaimer and Copyright
Copyright: Holger Vogt, 2020
Copyright: Holger Vogt, 2021
License: Creative Commons Attribution Share-Alike (CC-BY-SA) v4.0.
This document is provided as is. The information in it is not
warranted to be correct: you use it at your own risk.

85
INSTALL
View File

@ -5,13 +5,12 @@ Table of contents
1 Ngspice installation (LINUX)
1.1 Prerequisites
1.2 Install from tarball (e.g. ngspice-31.tar.gz)
1.2 Install from tarball (e.g. ngspice-34.tar.gz)
1.3 Install from git repository
1.4 Advanced Install
1.4.1 Most useful options
1.4.2 Options Specific to Enable Ngspice as a shared library
1.4.3 Options Specific to Using Ngspice
1.4.4 Options Useful for Debugging Ngspice
1.4.3 Options Useful for Debugging Ngspice
2 Compilers and Options
3 Compiling For Multiple Architectures
4 Installation Names
@ -21,7 +20,7 @@ Table of contents
8 Operation Controls
9 NGSPICE COMPILATION UNDER WINDOWS OS
9.1 How to make ngspice with MINGW and MSYS
9.2 make ngspice with MS Visual Studio 2015/2017
9.2 make ngspice with MS Visual Studio 2019
9.3 make ngspice with pure CYGWIN
9.4 ngspice console app with MINGW or CYGWIN
9.5 cross compiling ngspice for Windows from LINUX
@ -40,10 +39,12 @@ This file describes the procedures to install ngspice from sources.
Ngspice is developed on GNU/Linux with gcc and GNU make.
The following software must be installed in your system to compile ngspice:
bison, flex, and X11 headers and libs.
bison, flex, X11 headers and libs, Xaw, Xmu, Xext, Xft, FontConfig,
Xrender, and freetype headers (e.g. libX11-devel) and libs (e.g. libX11-6),
and readline.
If you want to compile the source from the git repository you need
additional software: autoconf, automake, libtool, texinfo, readline.
additional software: autoconf, automake, libtool.
The following software may be needed when enabling additional features:
editline, tcl/tk, adms
@ -53,14 +54,14 @@ This file describes the procedures to install ngspice from sources.
information on ngspice and its usage.
1.2 Install from tarball (e.g. ngspice-31.tar.gz)
1.2 Install from tarball (e.g. ngspice-34.tar.gz)
This covers installation from a release distribution (for example
ngspice-31.tar.gz, the so called tar ball).
ngspice-34.tar.gz, the so called tar ball).
After downloading the tar ball to a local directory unpack it using:
$ tar -zxvf ngspice-31.tar.gz
$ tar -zxvf ngspice-34.tar.gz
Now change directories in to the top-level source directory (where this
INSTALL file can be found).
@ -136,6 +137,8 @@ This file describes the procedures to install ngspice from sources.
$ make 2>&1 | tee make.log
$ sudo make install
A bash script compile_linux.sh is available including all useful options.
If a problem is found with the build process, please submit a report to
the ngspice development team. Please provide information about your system
and any ./configure arguments you are using, together with any error
@ -214,62 +217,12 @@ This file describes the procedures to install ngspice from sources.
"tclspice" is compiled and installed instead of
plain ngspice.
1.4.3 Options Specific to Using Ngspice
Most of the options now following are not well maintained, are not tested or even maybe
obsolete and dangerous.
--enable-capbypass
Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd
voltages are unchanged.
--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.
--enable-expdevices
Enable experimental devices. This option is used by developers
to mask devices under development. Almost useless for users.
--enable-experimental
define EXPERIMENTAL_CODE to mark experimental parts the code
(currently not used)
--enable-help
Force building nghelp. This is deprecated.
--enable-ndev
Enable NDEV interface, (experimental, needs updating)
A TCP/IP interface to external device simulator such as GSS.
For more information, please visit the homepage of GSS at
http://gss-tcad.sourceforge.net
--enable-newpred
Enable the NEWPRED symbol in the code.
--enable-newtrunc
Enable the newtrunc option
--enable-nodelimiting
Experimental damping scheme
--enable-nobypass
Don't bypass recalculations of slowly changing variables
--enable-predictor
Enable a predictor method for convergence
--enable-sense2
Use spice2 sensitivity analysis
--with-editline=yes
Enables the use of the BSD editline library (libedit).
See http://www.thrysoee.dk/editline/
1.4.4 Options Useful for Debugging Ngspice
1.4.3 Options Useful for Debugging Ngspice
--enable-ansi
Configure will try to find an option for your compiler so that
@ -323,6 +276,9 @@ Most of the options now following are not well maintained, are not tested or eve
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
On CentOS with older GCC it might be necessary to add -std=c99
to the CFLAGS in ./compile_linux.sh .
3 Compiling For Multiple Architectures
====================================
@ -461,8 +417,8 @@ Most of the options now following are not well maintained, are not tested or eve
automake, libtool, FLEX and BISON, all available with pacman in MSYSS2).
Some links are given below which describe the procedures.
Installing from the tarball, e.g. ngspice-32.tar.gz, is now simple: After
expanding, you may just run ./compile_min.sh from the ngspice-32 directory.
Installing from the tarball, e.g. ngspice-34.tar.gz, is simple: After
expanding, you may just run ./compile_min.sh from the ngspice directory.
The default installation location of ngspice is the Windows path
C:\spice. The install path can be altered by passing --prefix=NEWPATH
@ -477,7 +433,7 @@ Most of the options now following are not well maintained, are not tested or eve
the ngspice website), if you don't want to use the script named above
is as follows:
$ cd ngspice-32
$ cd ngspice
$ mkdir release
$ cd release
$ ../configure --with-wingui ...and other options
@ -696,3 +652,6 @@ cross-compile-shared.sh.
./configure --enable-adms --enable-cider --enable-xspice --enable-openmp --enable-pss --with-readline=yes --enable-debug=no
6. Compile NGSPICE invoking "make -j4"
7. Install NGSPICE invoking "make install" or "sudo make install"
A compile script compile_macos.sh contains all necessary steps.

View File

@ -12,7 +12,7 @@
# ---------------
# Initialization of configure
AC_INIT([ngspice], [33+], [http://ngspice.sourceforge.net/bugrep.html])
AC_INIT([ngspice], [34], [http://ngspice.sourceforge.net/bugrep.html])
# Unique file in the source directory
AC_CONFIG_SRCDIR([src/ngspice.c])

View File

@ -10,7 +10,7 @@
/*******************/
#ifdef _MSC_VER
#define SHAREDSPICE_version "33.0"
#define SHAREDSPICE_version "34.0"
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2

View File

@ -26,8 +26,8 @@ libhicum2_la_SOURCES = \
hicum2soachk.c \
hicum2trunc.c
AM_CFLAGS = -O -g -Wall -Wextra -Wunused-but-set-variable -I$(top_srcdir)/src/include
AM_CPPFLAGS = @AM_CPPFLAGS@ -O -g -Wall -Wextra -Wunused-but-set-variable
AM_CFLAGS = -O -g -Wall -Wextra -I$(top_srcdir)/src/include
AM_CPPFLAGS = @AM_CPPFLAGS@ -O -g -Wall -Wextra
AM_CXXFLAGS = -I$(top_srcdir)/src/include/cppduals -I$(top_srcdir)/src/include -std=c++11 -O -g -Wall -Wextra
MAINTAINERCLEANFILES = Makefile.in

View File

@ -41,9 +41,9 @@ sf_alloc(int n /* number of elements */,
/* Use calloc so that any internal allocations will be set to NULL to
* facilitate error recovery */
if ((ptr = calloc(n, size)) == NULL) {
if ((ptr = calloc((size_t)n, size)) == NULL) {
cm_message_printf("%s: cannot allocate %zd bytes : ",
__FILE__, n * size);
__FILE__, (size_t)n * size);
return NULL;
}

View File

@ -30,7 +30,7 @@ char *CNVgettok(char **s)
/* skip over any white space */
while (isspace(**s) || (**s == '=') ||
while (isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') || (**s == ','))
(*s)++;
@ -49,7 +49,7 @@ char *CNVgettok(char **s)
/* or a mess o' characters. */
i = 0;
while ( (**s != '\0') &&
(! ( isspace(**s) || (**s == '=') ||
(! ( isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') ||
(**s == ',')
) ) ) {
@ -63,7 +63,7 @@ char *CNVgettok(char **s)
/* skip over white space up to next token */
while (isspace(**s) || (**s == '=') ||
while (isspace_c(**s) || (**s == '=') ||
(**s == '(') || (**s == ')') || (**s == ','))
(*s)++;

View File

@ -166,7 +166,7 @@ ipc_transport_initialize_server (
/* with version 1 (mailboxes) functions of the same names. */
{
struct sockaddr_in server; /* Server specifications for socket*/
unsigned int server_length; /* Size of server structure */
int server_length; /* Size of server structure */
int port_num; /* Port number converted from server_name */
NG_IGNORE(mode);
@ -513,7 +513,7 @@ ipc_transport_get_line (
if (sock_state == IPC_SOCK_INITIALIZED) {
/* We have an open socket but have not connected to a client. */
/* Accept a connection from a client. */
msg_stream = accept (sock_desc, (struct sockaddr *)0, (unsigned int *)0);
msg_stream = accept (sock_desc, (struct sockaddr *)0, (socklen_t*)0);
if (msg_stream == -1) {
fprintf (stderr, "ERROR: IPC: Server accepting request\n");

View File

@ -449,7 +449,7 @@
#define PACKAGE "ngspice"
/* Version number of package */
#define VERSION "33+" //" Built on " __DATE__ " at " __TIME__
#define VERSION "34" //" Built on " __DATE__ " at " __TIME__
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "http://ngspice.sourceforge.net/bugrep.html"

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@ -1337,11 +1337,9 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\frontend\parse-bison.y;..\src\spicelib\parser\inpptree-parser.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<ClInclude Include="..\src\include\cppduals\duals\dual">
<FileType>Document</FileType>
</ClInclude>
<None Include="..\src\xspice\icm\objects.inc" />
</ItemGroup>
<ItemGroup>
@ -2706,7 +2704,22 @@ lib /machine:x64 /def:..\..\fftw-3.3-dll64\libfftw3-3.def /out:$(IntDir)libfftw3
<ItemGroup>
<ResourceCompile Include="vngspice.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="ngspice.ico" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="..\src\frontend\parse-bison.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\spicelib\parser\inpptree-parser.y">
<Message>invoke win_bison.exe for %(Identity)</Message>
<Command>..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1</Command>
<Outputs>.\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h</Outputs>
</CustomBuild>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>