Holger Vogt
d0e91f58b3
Prevent crash if port number is less than 1.
2023-12-10 18:01:07 +01:00
Holger Vogt
e0ee0bf131
Don't silently accept wrong user input (missing nodes, values).
...
Check for at leat 4 tokens (name, n1, n2, val/model/...).
If the instance has not been set up correctly, bail out, prevent crash.
2023-12-10 15:18:17 +01:00
Holger Vogt
a3fef757a5
typo
2023-12-10 15:16:05 +01:00
Holger Vogt
0cdf3f0d28
Don't prescribe a different resistance value if the user has given one > 0.
2023-12-10 15:15:44 +01:00
Holger Vogt
88ce328d84
Remove another potential crash if buggy user input
2023-12-08 10:40:33 +01:00
Holger Vogt
3b38125afd
Enable measurements with ?-sweep (v, i, temp, or res).
...
Improve error messages.
Prevent crash is compüdata is not available.
Add to examples for measure failures.
2023-12-08 10:32:15 +01:00
Holger Vogt
5ae5e877d2
prepare ngspice-42
2023-12-08 10:30:12 +01:00
dwarning
b0d3b20641
hisim2: allow compile w/o NEWCONV defined
2023-12-05 17:02:51 +01:00
dwarning
90f0680b51
allow compile w/o NEWCONV defined
2023-12-05 10:48:11 +01:00
Brian Taylor
1adee64224
Add scripts for running the paranoia tests in parallel on Linux with valgrind.
2023-12-04 15:12:15 +01:00
Giles Atkinson
3cf8fe8c41
Stop after last data point, preventing read overrun of nscale.
2023-12-01 12:26:58 +00:00
Holger Vogt
7175a39448
Add files com_fileio.c, .h to shared and fftw ngspice
2023-11-30 20:10:41 +01:00
Giles Atkinson
d82f948832
Fix a crash found by Brian Taylor: when .plot attempts to plot digital
...
node history, interpolation may produce an infinite value at digital edges.
Remove vertical edges when interpolating and make some other improvements:
do not calculate a polynomial approximation for unused frames;
center the target x-value in the frame; and do not propogate a reduction
in degree to later frames.
2023-11-30 17:23:32 +00:00
Giles Atkinson
c18447f9f5
Add the support files for co-simulation with Verilog code
...
compiled by Verilator. Also add script files to Visual Studio builds
that are already installed by the Makefile builds.
2023-11-27 20:55:59 +00:00
Giles Atkinson
a92c569b72
Prevent some strings being mis-recognised by strstr(), including
...
one that causes a false error message from the vlnggen script.
2023-11-27 17:17:21 +00:00
Giles Atkinson
597268cc26
Treat input files names passed a start-up the same as those entered
...
as commands or called as scripts: search for them using $sourcepath.
2023-11-27 17:16:55 +00:00
Giles Atkinson
07ce9c788e
Recognise *ng_script_with_params" in the first line of the first
...
program input file to mean that the file is a pure interpreter
script that receives any remaining command arguments.
In winmain.c ensure that the argv array is NULL-terminated
and tidy some code.
2023-11-27 17:06:39 +00:00
Giles Atkinson
89851872ed
When substituting interpreter variables, allow '$' to be part of
...
the variable expresstion only within '[]' or '()'. That lets
forms like "$a$b" to be treated as two substitutions, not one.
2023-11-27 15:13:31 +00:00
Giles Atkinson
3ba314d4bc
New interpreter commands strstr, strslice, fopen, fread and fclose.
2023-11-27 14:58:01 +00:00
Giles Atkinson
566e2938f4
Add XSPICE code model d_cosim, a generic adaptor for digital cosimulation.
2023-11-27 14:50:21 +00:00
Giles Atkinson
12fe7b90c4
Add new code model function cm_irreversible(). This may only be
...
called from an XSPICE code model's INIT call and has three effects:
the instance is treated as "hybrid" even when it does not use both
port types; its position in the hybrids array is adusted; and it
is explicitly notifed when called just befoore the end of an
analog time-step.
2023-11-26 18:30:53 +00:00
Giles Atkinson
34e6c4abea
Convert XSPICE's hybrid_index array to instance pointers.
...
That simplifies code and will be needed for irreversible code model support.
2023-11-26 18:29:23 +00:00
Giles Atkinson
508fad0f55
In dctran.c, call EVTcall_hybrids() (which then calls a subset of
...
code model instances) only when the current timestep was successful.
That is efficient and means that code models may rely on such calls,
for example a co-simulator may safely advance to the end of the timestep.
The function cm_irreversible() that is mentioned in a comment will be
added in a later commit.
2023-11-26 18:29:03 +00:00
Holger Vogt
3d1cbf93ee
Add a predifined variable 'skywaterpdk' to speed up circuit
...
loading and parsing.
If set, it removes quoting tokens for params. This requires
that Skywater PDK does adequately stick to the ngspice syntax
to put params in between braces. As far as tests go, it does.
It also set the number of nodes for MSO devices to 4, so no lengthy
search is required.
2023-11-23 18:29:48 +01:00
Holger Vogt
dd58b07949
Initialize the new mutex vecreallocMutex
2023-11-19 12:37:29 +01:00
Holger Vogt
1849a8d220
Add functions ngSpice_LockRealloc and ngSpice_UnlockRealloc
...
to lock reallocing output vectors, e.g. during reading the
vecs for plotting.
2023-11-19 12:05:18 +01:00
Holger Vogt
e87651e27f
Update to comments, restrict mutex definitions to shared ngspice
2023-11-19 12:05:10 +01:00
Holger Vogt
3619041e26
Add new lock for realloc of vectors
2023-11-19 12:05:01 +01:00
Holger Vogt
1db8eff25c
Write message only once.
2023-11-19 10:46:19 +01:00
Holger Vogt
ecf4f819dc
typo
2023-11-19 10:44:42 +01:00
Holger Vogt
40a783408c
Remove adms, enable klu
2023-11-18 20:10:17 +01:00
Holger Vogt
86e991515e
Enable compiling with MINGW under MS Windows
2023-11-18 20:09:49 +01:00
Holger Vogt
4d4f226a83
Prevent crash, when vector is defined, but still empty.
2023-11-18 17:17:04 +01:00
Holger Vogt
e376c0e5c6
Eanble op or ac op (operating point), when selfheat is on.
...
op for tran has been o.k.
Fixme: preliminary fix or hack.
2023-11-18 17:16:19 +01:00
Holger Vogt
b62bb20e6f
Increase the allowable node name length from 24 to 256.
...
Enable safe copying, no user induced buffer overflow.
2023-11-18 10:55:19 +01:00
Holger Vogt
10756111bf
Fix a bug when deleting the memory. With the first call
...
to mem_delete() all the hash table is deleted, a second
call to mem_delete() does not have any further effect, so
has to be avoided.
2023-11-18 09:58:30 +01:00
Holger Vogt
e57979d15d
Plug two memory leaks introduced by
...
2bbadc608 ("Use a hash table glonodes to prevent
double or multiple entries in global node table
global_nodes", 2023-11-17)
2023-11-17 23:50:59 +01:00
Holger Vogt
70e366021b
Generate seed numbers from a microseconds clock, not a seconds clock
2023-11-17 18:35:21 +01:00
Holger Vogt
81bb886c71
Replace array global_nodes by hash table glonodes:
...
Save each global node only once
Search for global nodes hash table (much faster than scanning the list repeatedly).
Remove limit for amount of global nodes.
2023-11-17 17:02:06 +01:00
Holger Vogt
2bbadc6085
Use a hash table glonodes to prevent double or multiple entries
...
in global node table global_nodes
2023-11-17 13:58:57 +01:00
Holger Vogt
d060cb82af
typo
2023-11-17 13:57:39 +01:00
Holger Vogt
0735b8d0a5
fix previous commit on repeating error messages
2023-11-15 22:54:53 +01:00
Holger Vogt
22a10c0e44
typo
2023-11-15 22:54:06 +01:00
Holger Vogt
55ba927973
If nan occurs during op calculation, issue the warning
...
no more than 10 times.
2023-11-14 16:57:14 +01:00
Holger Vogt
4da3dc51fd
If compatmode ps or lt: add a series resistance (100µOhms) to
...
diodes, when RS is not given or 0:
Improves convergence in behavioural models for op evaluation.
2023-11-14 16:56:31 +01:00
Holger Vogt
29bfe94318
Exclude some code under a unified #undef REM_USED
2023-11-13 12:32:15 +01:00
dwarning
2cf2693706
few code cleanings
2023-11-12 17:04:36 +01:00
Holger Vogt
2a005292db
Sparse 1.3 is the matrix solver if no option (sparse or klu) is given.
...
KLU is selected by 'option klu'
If both 'option klu' and 'option sparse' are given,
the last one executed determines the solver.
'option sparse=0' de-selects spares, i.e. selects klu.
'option klu=0' de-selects klu, selects sparse.
'option klu=1' has the same meaning as 'option klu'.
'option sparse=1' has the same meaning as 'option sparse'.
2023-11-12 16:32:40 +01:00
Holger Vogt
5645968510
compiling with klu is now standard
2023-11-12 15:40:04 +01:00
Holger Vogt
c87df54f24
Remove unused global variable cp_dol.
...
This also prevents a gcc 13 bug, as cp_dol has been set to '\0'
by -O2 optimization (see
https://stackoverflow.com/questions/77407156/s-0-being-optimized-out-possible-gcc-13-bug-or-some-undefined-behaviour )
2023-11-11 10:39:51 +01:00