Merge branch 'pre-master-47' into bt_dev

This commit is contained in:
Brian Taylor 2026-04-02 12:00:27 -07:00
commit 13a3777aec
11 changed files with 90 additions and 25 deletions

15
FAQ
View File

@ -1,7 +1,7 @@
Ngspice F.A.Q.Version 2.9 (ngspice-45 release)
Ngspice F.A.Q.Version 2.10 (ngspice-46 release)
Maintained by Holger Vogt
Last update: Aug 29 2025
Last update: Mar 29 2026
This document contains the Frequently Asked Questions (and Answers)
for ngspice project.
@ -256,7 +256,7 @@
The latest version released is:
ngspice-45 (released on August 31, 2025)
ngspice-46 (released on March 29, 2026)
2.2. What are the latest features in the current release?
@ -268,8 +268,9 @@
Ngspice, as the original Spice3 (and Xspice and Cider) is a command
line simulator, but with a graphics output capability. Excellent
open source third party tool for schematic capture (KiCad, XSCHEM,
Qucs-S and others) are available.
open source third party tool for schematic capture (KiCad, XSCHEM,
Qucs-S and others) are available
(see https://ngspice.sourceforge.io/resources.html).
2.4. Who are the authors of ngspice?
@ -312,7 +313,7 @@
a GNU C/C++ compiler and a LINUX environment to compile it. Ngspice can
be compiled under Windows using the mingw or cygwin environment as
well as MS Visual Studio. It will readily compile on macOS, Intel CPUs or
Apple M1 - M4. Wasm, FreeBSD or Solaris will do, but are not officially
Apple Silicon. Wasm, FreeBSD or Solaris will do, but are not officially
supported.
@ -357,7 +358,7 @@
4.4. Disclaimer and Copyright
Copyright: Holger Vogt, 2025
Copyright: Holger Vogt, 2026
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.

22
INSTALL
View File

@ -50,7 +50,7 @@ This file describes the procedures to install ngspice from sources.
library and ngspice as a tcl/tk library.
Compilation to 64 bit is recommended and available per default in
the ./compile_linux_new.sh compile script. 32 bit might be possible,
the ./compile_linux.sh and other compile scripts. 32 bit might be possible,
but is not tested.
The following software must be installed in your system to compile
@ -68,7 +68,7 @@ This file describes the procedures to install ngspice from sources.
internal fft algorithms.
If you want to compile the source from the git repository, or if you want to
use the compile script ./compile_linux_new.sh, you will need additional software:
use the compile script ./compile_linux.sh, you will need additional software:
autoconf, automake, libtool.
The following software may be needed when enabling additional features:
@ -81,21 +81,22 @@ This file describes the procedures to install ngspice from sources.
For compiling ngspice as a shared library, see section 1.4.
1.2 Install from tarball (e.g. ngspice-45.tar.gz)
1.2 Install from tarball (e.g. ngspice-46.tar.gz)
This covers installation from a release distribution (for example
ngspice-45.tar.gz, the so called tar ball).
ngspice-46.tar.gz, the so called tar ball).
After downloading the tar ball to a local directory, unpack it by command:
$ tar -zxvf ngspice-44.tar.gz
$ tar -zxvf ngspice-46.tar.gz
Now change directories in to the top-level source directory (where this
INSTALL file can be found).
The most comfortable way to compile ngspice is running the compile script
compile_linux.sh within the terminal window by ./compile_linux.sh. The
script has to be declared as 'executable', and admin
compile_linux.sh within the terminal window by
sudo ./compile_linux.sh.
The script has to be declared as 'executable', and admin
rights are required to allow the installation of ngspice.
CentOS users may need to add -std=c99 to the CFLAGS in the ../configure
@ -568,7 +569,7 @@ This file describes the procedures to install ngspice from sources.
4 NGSPICE COMPILATION UNDER macOS M1 - M4
=======================================
(tested on a mac mini with Sonoma 13.2.1 and M2 CPU)
(tested on a mac mini with Sequoia 15.7.4 and M2 CPU)
4.1 Prerequisites
1. Install xcode command line tools
@ -588,8 +589,9 @@ This file describes the procedures to install ngspice from sources.
compile_macos_clang_M2_shared.sh
5 NGSPICE COMPILATION UNDER macOS (tested with Intel CPUs)
========================================================
5 NGSPICE COMPILATION UNDER macOS
(previously tested for ngspice-42 with Intel CPUs)
================================================
5.1 Use precompiled binary package
1. Install an X11 interface (like Xquartz)

34
NEWS
View File

@ -1,3 +1,37 @@
Ngspice-46, March 29th, 2026
============
- New features:
+ Updates to BSIM4.
+ Enable CIDER with KLU for DC, OP, and TRAN analyses.
+ Support Exxx n1 n2 nc1 nc2 TABLE = (x0, y0, x1, y1, x2, y2).
+ Add analog code model astate, which reports previous states of a node.
+ Improve code model pwlts by adding breakpoints.
+ new functions vec() and var() for .param expressions.
+ Add variable deltacheck to measure the CKTdelta[0].
+ Remove ancient IPC code.
+ Update to VDMOS model.
+ Equalise the last two time steps before a breakpoint.
+ Update to diode model, especially for the sidewall diode.
+ Enable optional voltage based truncation error correction.
+ Add a function m3avg(vector) for filtering of trap ringing.
+ Remove ngnutmeg from build list of old apps.
+ Add filtering by moving window with function 'newvec = mtimeavg(vec)'.
+ If compat mode PS, GND is not declared as global, and is not
replaced inside of a subcircuit.
+ New variable measureprec to set the number of digits for 'meas' outputs.
+ Improve paramerization for V PULSE source.
+ Add parameter m (multiplier), while translating from G or F source
to code model spice2poly.
+ Allow Cd as a valid C reference designator for a capacitor.
+ Prepare for binning of N devices.
+ Add parameter numPeriod to 'fourier' command.
+ FM and FC exchange place in the parameter sequence of SFFM v and i source.
+ Diode soft recovery model with iterated charge node.
+ 'linearize' command with new parameter np=xx, xx may be a number or auto2n.
+ update to the 'fft' command on scaling and frequency binning.
+ Remove 'skywater' option, replace by equivalent variable 'no_auto_braces'.
Ngspice-45.2, Sept. 5th, 2025
============
- Bug-fix release

View File

@ -16,7 +16,7 @@
# problem to the user.
AC_PREREQ([2.70])
m4_define([ngspice_major_version], [45+])
m4_define([ngspice_major_version], [46+])
m4_define([ngspice_minor_version], [0])
m4_define([ngspice_version],
[ngspice_major_version])
@ -117,7 +117,7 @@ LT_INIT([shared static])
# --> Set 'LT_NGSPICE_AGE' to 0.
LT_NGSPICE_CURRENT=0
LT_NGSPICE_REVISION=13
LT_NGSPICE_REVISION=15
LT_NGSPICE_AGE=0
LIBNGSPICE_SO_VERSION=$LT_NGSPICE_CURRENT.$LT_NGSPICE_REVISION.$LT_NGSPICE_AGE

View File

@ -8426,7 +8426,7 @@ static void inp_quote_params(struct card *c, struct card *end_c,
{
bool in_control = FALSE;
if (ft_skywaterpdk)
if (cp_getvar("no_auto_braces", CP_BOOL, NULL, 0))
return;
if (newcompat.hs && cp_getvar("no_auto_braces", CP_BOOL, NULL, 0))

View File

@ -23,7 +23,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
bool ft_acctprint = FALSE, ft_noacctprint = FALSE, ft_listprint = FALSE;
bool ft_nodesprint = FALSE, ft_optsprint = FALSE, ft_noinitprint = FALSE;
bool ft_norefprint = FALSE, ft_skywaterpdk = FALSE;
bool ft_norefprint = FALSE;
bool ft_ngdebug = FALSE, ft_nginfo = FALSE, ft_stricterror = FALSE, ft_spiniterror = FALSE;
bool ft_codemodelerror = FALSE, ft_osdierror = FALSE;
@ -309,8 +309,6 @@ cp_usrset(struct variable *var, bool isset)
ft_ngdebug = isset;
} else if (eq(var->va_name, "nginfo")) {
ft_nginfo = isset;
} else if (eq(var->va_name, "skywaterpdk")) {
ft_skywaterpdk = isset;
} else if (eq(var->va_name, "noinit")) {
ft_noinitprint = isset;
} else if (eq(var->va_name, "norefvalue")) {

View File

@ -38,6 +38,11 @@ extern int EVTsetup_plot(CKTcircuit* ckt, char* plotname);
extern IFsimulator SIMinfo;
extern char Spice_Build_Date[];
extern unsigned long long getMemorySize(void);
extern unsigned long long getPeakRSS(void);
extern unsigned long long getCurrentRSS(void);
extern unsigned long long getAvailableMemorySize(void);
static int beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analName,
char *refName, int refType, int numNames, char **dataNames, int dataType,
bool windowed, runDesc **runp);
@ -60,6 +65,7 @@ static bool getSpecial(dataDesc *desc, runDesc *run, IFvalue *val);
static void freeRun(runDesc *run);
static int InterpFileAdd(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr);
static int InterpPlotAdd(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr);
static inline int vlength2delta(int len);
/*Output data to spice module*/
#ifdef TCL_MODULE
@ -550,6 +556,25 @@ OUTpD_memory(runDesc *run, IFvalue *refValue, IFvalue *valuePtr)
{
int i, n = run->numData;
#ifndef __APPLE__
if (!cp_getvar("no_mem_check", CP_BOOL, NULL, 0)) {
/* Estimate the required memory */
int timesteps = vlength2delta(0);
size_t memrequ = (size_t)n * timesteps * sizeof(double);
size_t memavail = getAvailableMemorySize();
if (memrequ > memavail) {
fprintf(stderr, "\nError: memory required (%zu Bytes), made of\n"
" %d nodes and approximately %d time steps,\n"
" is more than the memory available (%zu Bytes)!\n",
memrequ, n, timesteps, memavail);
fprintf(stderr, "Setting the output memory is not possible.\n");
controlled_exit(1);
}
}
#endif
for (i = 0; i < n; i++) {
dataDesc *d;

View File

@ -250,7 +250,6 @@ extern bool ft_stricterror;
extern bool ft_spiniterror;
extern bool ft_codemodelerror;
extern bool ft_osdierror;
extern bool ft_skywaterpdk;
/* parse.c */

View File

@ -124,7 +124,11 @@ are of type bool if sharedspice.h is used externally.
*/
#ifndef NGSPICE_PACKAGE_VERSION
<<<<<<< HEAD
#define NGSPICE_PACKAGE_VERSION "45+"
=======
#define NGSPICE_PACKAGE_VERSION "46+"
>>>>>>> pre-master-47
#endif
/* we have NG_BOOL instead of BOOL */
#ifndef HAS_NG_BOOL

View File

@ -85,6 +85,8 @@ DIOask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
return(OK);
case DIO_CHARGE:
value->rValue = *(ckt->CKTstate0+here->DIOcapCharge);
if ((here->DIOqpNode > 0) && (here->DIOtTransitTime!=0))
value->rValue += here->DIOqpGain * *(ckt->CKTstate0 + here->DIOsrcapCharge);
return(OK);
case DIO_CAPCUR:
value->rValue = *(ckt->CKTstate0+here->DIOcapCurrent);

View File

@ -15,7 +15,7 @@
#define PACKAGE "ngspice"
/* Version number of package */
#define VERSION "45+"
#define VERSION "46+"
/* Define the directory for executables */
#define NGSPICEBINDIR "../bin"