Holger Vogt
dd7b9ff273
Avoid memory crash when reading old VDMOS models.
...
Enable both old and current model format.
2023-12-30 22:52:41 +01:00
Holger Vogt
37944bd7c4
Preliminary fix to bug 650
...
Don't omit replacement, when independent nested subcircuit has been checked.
FIXME: Better use the cards level parameter.
2023-12-22 17:18:43 +01:00
Brian Taylor
8f52a67786
Fix set but not used warning.
2023-12-19 14:28:29 +01:00
Giles Atkinson
af31904f99
The previous fix for Bug #467 - ".OPTION INTERP has accuracy issue"
...
(359e3d46 ) updated variable timeold inside a loop so that
all interpolations after the first caused division by zero.
That caused the xspice/delta-sigma example to fail.
Set the variable once at the end of the function.
2023-12-19 14:27:33 +01:00
Holger Vogt
732c12c93f
Remove another potential crash if buggy user input
2023-12-09 15:43:19 +01:00
Holger Vogt
c69018fe82
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-09 15:43:15 +01: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
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
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
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
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
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
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
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
Giles Atkinson
359e3d4609
Fix Bug #467 - ".OPTION INTERP has accuracy issue".
2023-11-09 12:09:05 +00:00
Giles Atkinson
4228ba6e8a
Ignore end-of-line comments in quoted strings.
2023-11-09 12:06:34 +00:00
Holger Vogt
39443fafdd
Removing unused models takes much more time than keeping them
...
for large circuits.
Probably a hash table may help here (t.b.d.).
2023-10-18 14:36:08 +02:00
Holger Vogt
8ef0aece58
During setup of the models thre have been search scans in the
...
linked model list modtab. The time used here grows approx.
quadratically with the number of models. If the numbers get large,
e.g. with the IHP Open PDK, setup time make simulation impractical.
Therefore the linked list modtab has been enhanced by a hash table
modtabhash, which allows linear search time and makes simulation
of a 200k transistor circuit with IHP PDK possible. Already
the setup time for 15k transistor circuits has been reduced.
2023-10-18 14:34:16 +02:00
Holger Vogt
9edf34495e
Don't say 'issue in line no. 0', as this 'info' does not tell
...
where the line with position 0 really is in the input deck.
2023-10-09 23:19:30 +02:00
Holger Vogt
53315ed764
Prevent crash when no input file given.
2023-10-05 00:19:51 +02:00
Holger Vogt
28b495318d
Update to command 'wrnodev':
...
Prevent crash if tran is not (yet) run.
Open output file only when data are available.
Enhanced comment and warning message.
2023-09-28 10:05:31 +02:00
Holger Vogt
e449c894ce
Prepend title line by '*' if printed by 'listing r'.
...
This allows skipping all pre-processing.
2023-09-27 15:51:16 +02:00
Holger Vogt
76f837b0b7
skip all pre-processing for expanded input files created by 'listing r'
2023-09-27 15:49:37 +02:00
Giles Atkinson
2790fd68bb
Make the special "noglob" variable work. To preserve previous behaviour
...
change the default value from true to undefined (meaning false).
Also fix a misleading comment in glob.c.
2023-09-25 10:54:13 +02:00
Giles Atkinson
a70e708114
Make special interpreter variable "noglob" behave as documented:
...
globbing is off by default. An incompatible change, but previous
behaviour can be restored by "unset noglob" in .spiceinit.
2023-09-23 17:03:34 +02:00
Giles Atkinson
41c61604c5
Handle SIGTTIN and SIGTTOU on Unix-like OSs with X11 graphics.
...
That makes it possible to push ngspice into the background while
plot windows are open: the windows remain responsive.
Discussion on ngspice-users, starting 2023-09-01,
title: "`quit` in Interactive Mode."
Also restore terminal state when forcing exit with SIGINT (control-C).
2023-09-23 17:03:24 +02:00
Giles Atkinson
588116af48
Fix a bug in the "help" command. Some commands have no action function,
...
so the function pointer should not be used to detect the end of the table.
Use the command name instead.
2023-09-23 17:03:19 +02:00
Holger Vogt
f3eb46e76d
Fix bug in fprintf
2023-09-23 16:45:35 +02:00
Holger Vogt
b034332e84
Improve warning message during evaluating .probe
2023-09-19 14:57:22 +02:00
Holger Vogt
01bdd44ef9
Modify the previous commit a616a0abe:
...
no spaces in the first column
2023-09-15 23:41:12 +02:00
Vogt
a616a0abe3
Add variable wr_onspace to allow printing the vetor name with
...
one space delimiter
2023-09-14 15:22:14 +02:00
dwarning
4368790c5d
remove compiler warning wrt. prototypes
2023-09-11 14:50:27 +02:00
Holger Vogt
64307ba907
Add a title line to 'listing r', so the resulting output may be
...
re-loaded by the 'source' command.
2023-09-10 13:44:18 +02:00
Brian Taylor
492bb64d92
By default, use the shortest typical delay estimate. This makes the digi_74LS90_74LS42.cir testcase for bug641 behave almost the same as MicroCap 12. In ngspice and MicroCap, the only signal with a glitch is not_y8. The other not_* signals look the same. Setting ps_use_mntymx in .spiceinit will change the delay estimates. See the function set_u_devices_info in src/frontend/udevices.c for the various settings of ps_use_mntymx.
2023-09-09 23:22:06 +02:00
Holger Vogt
ad23146544
Don't check continuously for autostop, only when option flag is set
...
This speeds up simulations with simple device evaluation, but many
time stepps.
2023-09-09 18:37:13 +02:00
Holger Vogt
0f14c690d5
Stat. functions: safeguard against divide by zero, return nominal value
2023-08-26 10:15:08 +02:00
Holger Vogt
c0d73dcd6f
Fix bug 642 by replacing strstr() by search_plain_identifier()
2023-08-19 23:14:26 +02:00
Holger Vogt
adc645d8e9
Fix intro comment: NDEV is no longer supported in ngspice
2023-08-16 11:14:26 +02:00
Francesco Lannutti
8123fde6f7
Handled properly KLU messages when XSPICE is purely digital
2023-08-16 11:14:23 +02:00
Francesco Lannutti
937325e2ce
Handled an empty circuit with KLU
2023-08-16 11:14:23 +02:00
Holger Vogt
33eec95855
plug a memory leak
2023-08-16 11:14:20 +02:00