Commit Graph

3725 Commits

Author SHA1 Message Date
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
Francesco Lannutti 15e732dbb4 fix the list of supported devices 2023-08-16 11:14:11 +02:00
Francesco Lannutti ce18d6846f KLU Integration from scratch #4, changed files 2023-08-16 11:14:10 +02:00
Holger Vogt d90c9dd3b5 Initialize to remove VS2022 linker warnings 2023-08-13 10:01:12 +02:00
Holger Vogt b893e32d75 Reemove needless code, check for '}0',
don't do anything here if not true m=something
2023-08-12 15:11:41 +02:00
Holger Vogt 0e0c8de5ee Remove gcc compiler warning: remove needless code 2023-08-12 15:11:32 +02:00
Holger Vogt 9c2a87a469 Remove buggy if clause, add safeguards against buggy input 2023-08-12 15:11:21 +02:00
Holger Vogt 62f803dfa5 Remove gcc compiler warnings 2023-08-12 15:11:04 +02:00
Giles Atkinson 502f15522e Fix an infinite loop bug that may be seen with "stop whan a>b" or
"stop when a<>b".
2023-08-11 11:39:17 +02:00
Brian Taylor f16c0556af Add support for PSpice DLYLINE. 2023-08-11 11:39:06 +02:00
Holger Vogt 2065dee82c Fix comment on old-style .lib 2023-08-11 11:37:49 +02:00
Brian Taylor e235fda42b For d0_eff, d0_gff timing models specify the 1.0e-12 minimum Xspice delay valuesrather than defaulting to 1ns. 2023-08-11 11:37:19 +02:00
Holger Vogt d4c54123d4 Revert "Add code in ivars.c to look for a SPICE_ROOT environment variable"
This reverts commit 6b0ab44f1e.
2023-08-06 16:27:33 +02:00
Giles Atkinson 6b0ab44f1e Add code in ivars.c to look for a SPICE_ROOT environment variable
that gives the location of the ngspice installation.  That allows
binaries to be installed in a different directory to the one
compiled in.  The spinit startup file is made location-independent
by passing a variable giving the location of loadable modules,
so this fixes Bug #615 -
"spinit contains arch dependent paths, but is installed as noarch DATA".
2023-07-31 14:29:23 +02:00
Giles Atkinson 84821a4cf5 Add support for including analog node changes in VCD file output,
and an option to explicitly set the VCD timestep.  Correct the
output value for high-impedance nodes.
2023-07-31 14:28:29 +02:00
Holger Vogt 3adfa89cfc Prevent crash when number of parameter dependencies increases beyond
limit. Raise the limit from 100 to 200.
2023-07-31 14:27:49 +02:00
Holger Vogt aa10f9344e Add variable "csnumprec" to allow setting the precision of vectors
and variables as arguments to functions listet in manual chapter 17.5.
Default is 6, as has been standard up to now.
2023-07-31 14:27:23 +02:00
Holger Vogt fe3222a118 Add an option nginfo to enable a status report during simulation
(currently available only with MS Windows GUI version).
2023-07-31 14:26:40 +02:00
Holger Vogt c66f9faaab Remove compiler warnings (VS2022) 2023-07-31 14:26:23 +02:00
Brian Taylor b79eca646b Prevent crashes in udevices.c when malformed U* instances are present. This would happen with incorrectly written U* gates, ff, latches which do not conform to the PSpice specs. Instead, ERROR messages are output which, hopefully, will help a user to debug their subckt. 2023-07-31 14:26:01 +02:00
Giles Atkinson 480e269102 Allow netlist lines to grow during parameter substitution,
removing a 25-character limit on the size of string parameters.
2023-07-31 14:25:51 +02:00
Brian Taylor 4d8b105b86 Simplify expression nesting depth. 2023-07-15 11:34:09 +02:00
Giles Atkinson a60b7f5630 Fix sluggish output of the "Reference value" progress indicator on Linux
after it switched from stderr to stdout (28a3413).  Add fflush().
2023-07-15 11:31:03 +02:00
Giles Atkinson ac6487932b Make the returned status of the "shell" command available as interpreter
variable "shellstatus".  Also change the default shell to /bin/sh
as csh is now rare.
2023-07-15 11:30:48 +02:00