Commit Graph

912 Commits

Author SHA1 Message Date
Holger Vogt 8abfb5aeb0 Remove unused ft_gidb
Add debug ft_shvecsearch
Make ft_codemodelerror more verbose.
2026-04-06 14:15:42 +02:00
Giles Atkinson 82c91abea4 Discard all XSPICE event data when using "-b -r", as there is no way
to access it.  An initial step for FR #105: "Esave + rawfile".
2026-04-01 07:35:20 +01:00
Holger Vogt 499c1d3dca We develop towards ngspice-47 2026-03-30 16:08:41 +02:00
Holger Vogt d93bc07c15 Prepare for ngspice-46 2026-03-25 13:59:09 +01:00
Holger Vogt cd14f85cde Remove ft_skywaterpdk, replace it by variable no_auto_braces 2026-03-25 13:33:52 +01:00
Holger Vogt aab3371f36 A memory leak occurs when command 'step' is followed by 'quit'
without having reached the final TSTOP.
New function DCtran_step_quit() removes the leak.
2026-03-25 13:33:17 +01:00
Holger Vogt 7d0dce0e70 Update to warning messages if osdi or code model files cannot be loaded 2026-03-20 10:57:23 +01:00
Holger Vogt 81d3812db0 Add a user-settable variable measureprec to set the number of digits
when printing the measure outputs.
Internally this is a global variable measure_precision.
Enable all measure commands to recognize measure_precision when
printing an output.
Default value is 5 (yielding 6 digits after .?).
2026-03-20 10:28:28 +01:00
Holger Vogt ab87bd57a4 Re-enable compiling with clang
Patch thanks to Gon Solo, issue 826
2026-02-03 14:25:18 +01:00
Holger Vogt b25ff08307 Moving window filtering with function 'newvec = mtimeavg(vec)'
Window of fixed time width given by 'set mtimeavgwindow=400u'
Length and scale of newvec resembles the original vetor vec.
Large vec and large mtimeavgwindow take their time.
OpenMP is used if available.
2026-02-03 14:23:32 +01:00
Holger Vogt 8737839f41 Add a function m3avg(vector) for filtering of trap ringing.
Moving average with D(n) = (C(n-1)/2 + C(n) + C(n+1)/2)/2
2026-02-03 14:20:08 +01:00
Holger Vogt 8d21c8e79b Make pred available always 2026-02-03 14:19:42 +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 4958221e92 Update comment to cktnumstates 2026-02-03 14:16:48 +01:00
Holger Vogt abdd936cb8 Add missing function prototypes 2026-02-03 14:15:52 +01:00
Holger Vogt 6304f0124b Remove unused functions from the IFfrontEnd struct. 2026-02-03 14:13:54 +01:00
Holger Vogt 6004d9aef9 Improve comments 2026-02-03 14:08:28 +01:00
Holger Vogt 48d28f9f4a Entries to old CLUSTER code removed. 2026-02-03 14:07:15 +01:00
Holger Vogt e25c70b2bb add new function gettok_node_br which adds braces { } on its list
of ignored characters.
2026-02-03 13:57:23 +01:00
Holger Vogt 0648d5e844 Spelling
Found by Lintian, patches provided by C. Schoenert
2026-02-03 13:55:23 +01:00
Holger Vogt 49b35ed3fc We are developing towards ngspice-46 2026-02-03 13:52:36 +01:00
Holger Vogt 724dc77b91 Prepare bug-fix release ngspice-45.2. 2025-09-05 23:59:35 +02:00
Holger Vogt 86ea9fee8a Prepare for ngspice-45 2025-08-29 15:01:45 +02:00
Holger Vogt 508ab3bd8c New CPPDUALS: re-enable compiling with CYGWIN 2025-07-29 10:48:46 +02:00
Holger Vogt 7f8f510e91 add missing makefile.am, copied from previous cppduals/duals 2025-07-29 10:48:31 +02:00
Holger Vogt 6af3cfac72 New cppduals from https://gitlab.com/tesch1/cppduals
downloaded may 1st, 2025
2025-07-29 10:48:21 +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
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 44b620658e Event nodes can be plotted with offset by "iplot", like the
digitop option for "plot".  Offsets may be explicit or automatic with "-o".
A variable to set the offset is shared with "plot".  In plotcurv.c
suppress some warnings that should not apply to event nodes and do
not falsely claim that some vectors have only one x-value.
2025-05-24 11:27:37 +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
Árpád Bűrmen d659943d77 Per-device load timing support. 2025-05-24 10:56:33 +02:00
Holger Vogt 1a1d2558e8 We are developing towards ngspice-45 2025-05-24 10:50:59 +02:00
Holger Vogt 80d22fc802 Prepare the bug-fix release 44.2 2025-01-11 11:55:56 +01:00
Holger Vogt 8eea1f0b41 Prepare ngspice-44 2024-12-26 15:01:10 +01:00
Holger Vogt a6ad2470f1 Add a flag compmod to struct card.
Set compmod to 1 if netlist line is included by command 'incpslt'
Guard special newcompat.hs sections by compmod
2024-12-15 10:29:23 +01:00
Holger Vogt 3ca51e47b2 Unify to type bool 2024-12-15 10:26:29 +01:00
Holger Vogt deb3cd9809 Replace all BOOLEAN, BOOL, _Bool by bool
Remove all #undef bool (set in conjunction with #iclude <Windows.h>)
2024-12-15 10:25:28 +01:00
Brian Taylor 6500caeba1 Now that checks on actuals and formals have been fixed for X* instances, some older PSpice libraries will not translate correctly in psa mode. This commit removes unnecessary power and ground nodes from X* instances of subcircuits where the nodes are optional. These X* instances occur within the body of another subcircuit which is being translated. MicroCap libraries that we can translate in ngspice do not have such cases. To enable the removal of the power and ground nodes, set ps_global_tmodels=1 in .spiceinit. This is not set by default since an extra pass through the circuit word list is necessary to find the subcircuits whose instances do not require power and ground node removal. Without enabling this feature, errors reporting too many parameters may be reported. 2024-12-06 22:45:13 +01:00
Giles Atkinson c30bc423ba Initial fix for Bug 710 -
"The log file appears blank when a VDMOS element is added".
The problen was caused by a crash during sensitivity analysis
caused by selecting parameters for wariation based on their
values.  That is not repeatable between passes.  The fix is to
remove that code, but it causes many more parameters to be used.
2024-12-06 22:43:53 +01:00
Giles Atkinson 4feb0c3ccc Remove function cp_ccon() and related code. The function modifies
the terminal driver's treatment of the control-D (EOF) and escape
keys on Unix-like OSs.  But escape has no special meaning, and treating
control-D as a line terminator was probably to prevent unexpected
session exit when connected through a modem without error-correction.

Removing the function allows "ngspice netlist &" to work correctly.
The function was called during initialisation, which caused an endless
loop of job-control stops when ngspice was started as a background process.
2024-12-06 22:40:38 +01:00
dwarning 3faed1647a Reorder and renovate timer functions taking into account ngspice multiprocessor capabilities
by using available high performance functions first.
Deprecated ftime() still acts as a backup function.
Solution is portable for today's operating systems and compilers.
2024-12-06 22:35:02 +01:00
Holger Vogt 2b89d2a1cd Add function ngSpice_nospiceinit(void) if you don't want to read .spiceinit 2024-11-02 22:46:49 +01:00
Giles Atkinson f4c7202130 Fix gcc warnings. 2024-11-02 22:30:45 +01:00
Giles Atkinson 64a9a0bfbc Add a utility function to the d_cosim code model to open dynamic
libraries. It automatically tries adding standard file extensions,
so that model lines for d_cosim can be the same for all OSs.
2024-11-02 22:30:15 +01:00
Giles Atkinson 693a9df09f Add support for Verilator's --timing option, allowing use of delays
in Verilog source code.  Also add two parameters to d_cosim:
sim_args is used to pass string arguments to a Verilator simulation;
and lib_args is for future use.  In vlnggen, also check for two causes
of failure: a verilator error may lead to creation of interfering header
files; and misleading instances of verilated_shim.cpp can cause an obscure
failure (reported by Diarmuid Collins).
Use a generic name for the generated DLL in MSVC.CMD.
2024-11-02 22:29:54 +01:00
Holger Vogt d0ae65accf Add function ngSpice_Reset(void) to completely reset shared ngspice,
so that it may be restartet again by ngSpice_Init
2024-11-02 22:26:35 +01:00
Holger Vogt a8c1104cfb 43+ developing towards ngspice-44 2024-11-02 22:21:51 +01:00
Holger Vogt 33939d3f50 Prepare ngspice-43 2024-06-22 17:06:45 +02:00
Holger Vogt 344beaad24 Add ft_spiniterror, to be set during spinit processing,as
ft_stricterror will be set only later, when .spiceinit is
executed.
2024-06-22 14:21:01 +02:00
Holger Vogt 36bc67ecbb Save the wordlist sourceinfo to the current circuit.
Remove sourceinfo only upon 'quit'.
2024-05-14 16:30:59 +02:00