Holger Vogt
732c12c93f
Remove another potential crash if buggy user input
2 years ago
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.
2 years ago
Giles Atkinson
a92c569b72
Prevent some strings being mis-recognised by strstr(), including
one that causes a false error message from the vlnggen script.
2 years ago
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.
2 years ago
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.
2 years ago
Giles Atkinson
3ba314d4bc
New interpreter commands strstr, strslice, fopen, fread and fclose.
3 years ago
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.
2 years ago
Holger Vogt
e87651e27f
Update to comments, restrict mutex definitions to shared ngspice
2 years ago
Holger Vogt
3619041e26
Add new lock for realloc of vectors
2 years ago
Holger Vogt
1db8eff25c
Write message only once.
2 years ago
Holger Vogt
86e991515e
Enable compiling with MINGW under MS Windows
2 years ago
Holger Vogt
4d4f226a83
Prevent crash, when vector is defined, but still empty.
2 years ago
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)
2 years ago
Holger Vogt
70e366021b
Generate seed numbers from a microseconds clock, not a seconds clock
2 years ago
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.
2 years ago
Holger Vogt
2bbadc6085
Use a hash table glonodes to prevent double or multiple entries
in global node table global_nodes
2 years ago
Holger Vogt
29bfe94318
Exclude some code under a unified #undef REM_USED
2 years ago
dwarning
2cf2693706
few code cleanings
2 years ago
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 )
2 years ago
Giles Atkinson
359e3d4609
Fix Bug #467 - ".OPTION INTERP has accuracy issue".
2 years ago
Giles Atkinson
4228ba6e8a
Ignore end-of-line comments in quoted strings.
2 years ago
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.).
2 years ago
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.
2 years ago
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.
2 years ago
Holger Vogt
53315ed764
Prevent crash when no input file given.
3 years ago
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.
3 years ago
Holger Vogt
e449c894ce
Prepend title line by '*' if printed by 'listing r'.
This allows skipping all pre-processing.
3 years ago
Holger Vogt
76f837b0b7
skip all pre-processing for expanded input files created by 'listing r'
3 years ago
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.
3 years ago
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.
3 years ago
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).
3 years ago
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.
3 years ago
Holger Vogt
f3eb46e76d
Fix bug in fprintf
3 years ago
Holger Vogt
b034332e84
Improve warning message during evaluating .probe
3 years ago
Holger Vogt
01bdd44ef9
Modify the previous commit a616a0abe:
no spaces in the first column
3 years ago
Vogt
a616a0abe3
Add variable wr_onspace to allow printing the vetor name with
one space delimiter
3 years ago
dwarning
4368790c5d
remove compiler warning wrt. prototypes
3 years ago
Holger Vogt
64307ba907
Add a title line to 'listing r', so the resulting output may be
re-loaded by the 'source' command.
3 years ago
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.
3 years ago
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.
3 years ago
Holger Vogt
0f14c690d5
Stat. functions: safeguard against divide by zero, return nominal value
3 years ago
Holger Vogt
c0d73dcd6f
Fix bug 642 by replacing strstr() by search_plain_identifier()
3 years ago
Holger Vogt
adc645d8e9
Fix intro comment: NDEV is no longer supported in ngspice
3 years ago
Francesco Lannutti
8123fde6f7
Handled properly KLU messages when XSPICE is purely digital
3 years ago
Francesco Lannutti
937325e2ce
Handled an empty circuit with KLU
3 years ago
Holger Vogt
33eec95855
plug a memory leak
6 years ago
Francesco Lannutti
15e732dbb4
fix the list of supported devices
10 years ago
Francesco Lannutti
ce18d6846f
KLU Integration from scratch #4 , changed files
10 years ago
Holger Vogt
d90c9dd3b5
Initialize to remove VS2022 linker warnings
3 years ago
Holger Vogt
b893e32d75
Reemove needless code, check for '}0',
don't do anything here if not true m=something
3 years ago