~kicad/+git/ngspice-mirror-sourceforge:pre-master-34

Last commit made on 2021-08-07
Get this branch:
git clone -b pre-master-34 https://git.launchpad.net/~kicad/+git/ngspice-mirror-sourceforge
Members of KiCad can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
pre-master-34
Repository:
lp:~kicad/+git/ngspice-mirror-sourceforge

Recent commits

f8ed531... by Holger Vogt

Update for the caller to invoke shared ngspice
path to shared ngspice also via command line parameter
add some alter statement after bg_halt
some smaller fixes to outputs, messages upon exit etc.

8a87d0f... by Holger Vogt

Fix a bug with the alter statement
lower case for device name, when sent from shared ngspice
or from interactive mode.

d171c2d... by Holger Vogt

notice to enforce compiling and installing the code models

c4470db... by Vyacheslav Shevchuk <email address hidden>

XSPICE: fix double delta subtraction in dll mode

The problem is in XSPICE breakpoints handling and dll mode.
When ngspice is built as dll, it delegates CKTtime - CKTdelta
operation to the dll client using sharedsync call. Delta that
needs to be subtracted is passed as an olddelta argument, and
the client must subtract it if there are convergence issues.
If the client does not add a callback for this operation, default
implementation begins to work and substracts olddelta from CKTtime.
The problem is in breakpoints. When an analog breakpoint is between
the last accepted timepoint and CKTTime, then ngspice substracts
CKTdelta from CKTtime and passes 0 as olddelta to sharedsync.
It is ok. The problem is in XSPICE breakpoints. If XSPICE breakpoint is
set between the last accepted timepoint and CKTtime, then ngspice
substracts CKTdelta but pass non-zero olddelta to sharedsync.
As a result, olddelta is subtracted twice, and CKTtime becomes
less than the last accepted timepoint, which is incorrect.

The solution is to inform sharedsync call that olddelta has already
been subtracted from CKTtime during XSPICE breakpoint processing.
olddelta can't be set to 0 during XSPICE breakpoint handling because
it also takes part in the "timestep too small" check.

That is why a new flag has been introduced. It should be reset during
each iteration and set to 1 only when there are no convergence issues
and there are breakpoints between the last accepted timepoint and
CKTtime. If it is set, then DCtran knows that olddelta need to be set
to zero.

This issue has been fixed for SHARED_MODULE option only. Looks like
CLUSTER feature also uses incorrect olddelta, and it has to take into
account the XSPICE breakpoints flag. This problem has not been fixed
because we can't properly test this case.

WARNING: sharedsync is still broken if the library client decides
to use a callback for step delta managing and discard a valid
delta after the successful integration step. EVTBackup may drop
valid points in this case. The rule of thumb: do not set
GetSyncData callback in ngSpice_Init_Sync.

39b4f27... by Holger Vogt

When transferring boolean data over the ABI, keep them as boolean types, not integer

Replace the type of all boolean variables around the ABI by NG_BOOL.
NG_BOOL is typedefed to _Bool, when compiling shared ngspice. When
sharedspice.h is use externally NG_BOOL is typdefed to bool

d4b495d... by Holger Vogt

Add a small chapter on ngspice as shared library.

2ad3aa9... by tijuca

configure.ac: Adding version string for LIB_NGSPICE_API

This isn't currently used but can be used in various places to
automatically provide the internal API version that is used.
Normally developers doesn't want to break the API by introducing a
version bump as this means the new library isn't backward compatible
any more.

E.g. the API version can be used to enhance the name of the library,
quite often libraries with an API version 0 don't add this version to
library name (like ngspice is doing this too right now).

915bca9... by tijuca

src/Makefile.am: Adopt used variables for lib versioning

A small adjustment so the configured ABI version from configure.ac will
get used for creating the libngspice library.

a357108... by tijuca

libtool: Adding helping content for API versioning

Doing the libtool versioning right can be a bit tedious. Especially the
correct handling of the various versions for the libtool .so naming is
difficult to understand if this part isn't done often.

To improve the API versioning adding some helping text what the various
version number are intended for and how to handle these within the
life cycle and development of the Ngspice project.

Basically libtool uses 'current', 'revision' and 'age' to version a
library.
Here a short outline how to do the libtool versioning:

 Only bug fixing did happen, no new symbols were added, the new library
 provide the exact amount and behaviour of the existing symbols.

 --> Increase the 'revision' by 1 (c:r+1:a)

 New symbols were added, the behaviour of the existing symbols doesn't
 have changed.

 --> Increase the 'age' by 1, set 'revision' to 0 (c:r=0,a+1)

 Existing symbols behave now different or existing symbols were removed.

 --> Increase 'current' by 1, set 'revison' to 0, set 'age' to 0 (c+1,r=0,a=0)
 !!!Note!!!
 The ABI version is also affected by this (needs a bump too, the library
 isn't backward compatible any more.

1720745... by Holger Vogt

XSPICE delay: add some more safeguards