Commit Graph

675 Commits

Author SHA1 Message Date
Holger Vogt 24008efc83 Improve error message. 2026-03-20 10:37:10 +01:00
Holger Vogt a92eea2dfb Add warning message if E or H poly source has multiplier m 2026-03-20 10:36:47 +01:00
Holger Vogt 48a37be31c Add parameter m (multiplier), while translating from G or F source
to code model spice2poly
2026-03-20 10:36:32 +01:00
Holger Vogt 5b39c73205 Add a parameter m (output multiplicator)
to spice2poly code model.
2026-03-20 10:36:00 +01:00
Holger Vogt fe55cbe69f Enable optional voltage based truncation error correction.
This is selectable as 'option newtrunc' (--enable-Predictor is required)

Remove --enable-NEWTRUNC

Add three option parameters (default):
lteTrtol (500), lteReltol (1e-3), lteAbstol (1e-6)

Add new error function for TRAP, similar to GEAR
 (tentative, to be improved), in ckttrun.c

Enable PREDICTOR as default with Visual Studio.
2026-02-03 14:18:55 +01:00
Holger Vogt 4d24b18f35 Remove all entries connected to IPC, an outdated (>30 years)
method to link ngspice to a now defunct controller (ATESSE).
2026-02-03 14:07:59 +01:00
Holger Vogt e4aacf352a Add breakpoints to achieve quadratic smoothing.
Shift 50%-detection for breakpoints into the INIT section,
to do it only once.
2026-02-03 14:03:31 +01:00
Holger Vogt 76c4be60ce Add info for line source 2026-02-03 14:00:24 +01:00
Holger Vogt 7ea0ee9714 Add short description of code model 2026-02-03 13:58:21 +01:00
Holger Vogt 65fc0ad8a6 Add analog code model astate.
It reports the previous state (delayed by 1 to 3 time steps)
of the input node. Single or differential voltage or current.
2026-02-03 13:57:57 +01:00
Holger Vogt 63d5e94b94 Improve the error message by naming the port 2026-02-03 13:57:46 +01:00
Holger Vogt 0648d5e844 Spelling
Found by Lintian, patches provided by C. Schoenert
2026-02-03 13:55:23 +01:00
Holger Vogt dbb1db8b9d add tlines files to distribution 2025-08-29 23:55:36 +02:00
Holger Vogt c45d1e0974 Rename t to tn to avoid t shadowing the t from the function header
void cpmslineAnalyseDispersion (double W, double h, double s,
				   double t, double er, double Zle,
...
2025-08-28 12:15:40 +02:00
Vadim Kuznetsov 94740a3d2b Fixed warnings in cpmlin and mlin 2025-08-28 12:15:25 +02:00
Holger Vogt 481e3e567b Update to filesource
Move tprev out of the loop to enable storing the previous time value.
Add some general warning message that an error might have occurred during
reading the time or data values from the data input file.
Allow empty lines in the data input file.
Guard early data values (TIME < time offset) against false reading.
Add some simple examples.
2025-08-11 18:45:21 +02:00
Brian Taylor 179c7504fb Misplaced break statement in callback. 2025-08-08 11:46:33 +02:00
Holger Vogt b7692fbda7 Move CALLBACK into the 'init' section,
to have it called once only.
2025-08-08 11:46:06 +02:00
dwarning 7ede33e7c6 git ignore temporary file 2025-08-08 11:45:32 +02:00
Holger Vogt 787a8530be Prevent doubly defined tokens. 2025-08-08 11:45:15 +02:00
Holger Vogt cbf93cf8e0 Add missing CALLBACK 2025-08-08 11:44:51 +02:00
Holger Vogt 5af5f02ad1 Remove unused variable. 2025-08-08 11:44:34 +02:00
Brian Taylor 47d7f7aa62 Allocating arrays of double* should use sizeof double* not double, even though they may be the same. Avoid potential divide by zero. 2025-07-29 11:03:28 +02:00
Brian Taylor 416edbbb9a Fix memory leak in xspice oneshot. 2025-07-29 11:03:10 +02:00
Holger Vogt c24fc9e9d0 Remove compiler warning. 2025-07-29 11:02:39 +02:00
Holger Vogt 29d5584c56 Bug fixes:
fix function rdivide
fix a copy/paste bug in cpline
add copying of tlines
2025-07-29 11:01:57 +02:00
Holger Vogt 33efc5ed2c Add functions for VS non-C99-compatible complex data manipulation,
selected by #ifdef _MSC_VER switch.
Update tlines project file, correct buiuld sequence for
code models in vngspice.
Add tlines to spinit.
2025-07-29 11:01:30 +02:00
Holger Vogt 6d86b0ebda Visual Studio C does not support C99 complex types and functions
Add type DoubleComplex, to become 'double complex'
with gcc and _Dcomplex with Visual Studio.
Add functions rdivide and divide to divide real or complex numbers
by another complex number.
Use rdivide and VS built in function to evaluate _Z11 - _Z14.
2025-07-29 11:01:02 +02:00
Holger Vogt 89c2070a96 Add missing constants for Visual Studio C 2025-07-29 11:00:52 +02:00
Vadim Kuznetsov 741a7002d0 Fix licence header in msline_common 2025-07-29 10:56:31 +02:00
Vadim Kuznetsov dcb4202910 Added MSOPEN model 2025-07-29 10:55:51 +02:00
Vadim Kuznetsov 6914662c4d Implement rollback; fix memory management 2025-07-29 10:55:41 +02:00
Vadim Kuznetsov 4358b99183 Add license header for new files 2025-07-29 10:54:52 +02:00
Vadim Kuznetsov 047de0f201 Add XSPICE models for transmission lines 2025-07-29 10:54:23 +02:00
Holger Vogt ea5979d391 No autostart when ctrl is set.
Fix a bug when repeating the sequence.
2025-07-29 10:45:50 +02:00
Holger Vogt 07f8c3558b Add a monitoring output the the seegen instance 2025-07-29 10:45:30 +02:00
Holger Vogt b628032d7d Add a generator for SEE (single event effects) pulses as a code model.
To be used like
aseegen1 NULL [%id(xcell.n1 m1) %id(xcell.n2 m2) %id(xcell.n1 m1) %id(xcell.n2 m2)] seemod1
.model seemod1 seegen (tdelay = 11n tperiod=25n tfall='tfall' trise='trise' let='let' cdepth='d')
see README.SEEgenerator for details
2025-07-29 10:39:58 +02:00
Holger Vogt 878d7e1ff9 Add function cm_get_neg_node_name
as cm_get_node_name delivers only the pos node.
2025-07-29 10:39:47 +02:00
Brian Taylor 1b39cf9025 Fix some more -Wextra warnings.
Fix to inpcom.c removed by HVO
2025-05-24 11:31:05 +02:00
Holger Vogt d8317d57bc Re-enable compilation with MS Visual Studio, as "ngspice/config.h"
is not available.
Add-on to commit
4881b2973 ("Fix Bug #772 - "ngspice + icarus verilog cosim: searches for ivlng.so                 in /usr/local/lib/ngspice ...". Use the configured library directory, NGSPICELIBDIR.", 2025-04-11)
2025-05-24 11:29:57 +02:00
Giles Atkinson 9429a27af0 Fix typo in vlnggen error message. 2025-05-24 11:29:49 +02:00
Giles Atkinson d6f3267bf6 Fix Bug #772 - "ngspice + icarus verilog cosim: searches for ivlng.so
in /usr/local/lib/ngspice ...".
Use the configured library directory, NGSPICELIBDIR.
2025-05-24 11:29:38 +02:00
Giles Atkinson 16aadef4c7 Add two new functions to the shared library API.
ngSpice_Raw_Evt() requests a callback that returns all the
XSPICE events for a specific node that occurred during the last timestep.
ngSpice_Decode_Evt() provides numeric and string versions of
the event data.  Also fix some warnings in sharedspice.c.
2025-05-24 11:27:57 +02:00
Giles Atkinson 78924a86a1 Support use of XSPICE event nodes with iplot.
In graf.c, local function set() is renamed setflag() to avoid conflict
with a newly-visible global function with the same name.
2025-05-24 11:27:28 +02:00
Giles Atkinson d528c2a693 Do not strip event value member names (like "digital_node(strength")
from the name when creating a vector from event node history.
2025-05-24 11:27:16 +02:00
Giles Atkinson 5790dc2f4d Add two new XSPICE functions: EVTnew_value_call() and
EVTcancel_value_call().  EVTnew_value_call() specifies a function
to be called for each confirmed new value produced on an XSPICE
event node.  To be used to add event node support for iplot.
2025-05-24 11:27:03 +02:00
Brian Taylor 08aff1ee17 Fix memory leak of parm when there is a closing ). 2025-05-24 11:22:16 +02:00
Giles Atkinson f8c9da5ed5 The VPI module path should be first in the lib_args parameter. 2025-05-24 11:18:47 +02:00
Giles Atkinson 6c518d4212 Fix an infinite loop with "eprvcd -a" and a misleading comment.
The command now works without any event nodes.
2025-05-24 11:18:37 +02:00
Giles Atkinson 027fb7e9e8 Code to suppress a spurious warning of a non-existent parameter,
missed from e858ca9465.
2025-05-24 11:18:23 +02:00