Commit Graph

8437 Commits

Author SHA1 Message Date
Holger Vogt aecf5cdcba Fix comment on old-style .lib 2023-08-04 20:11:39 +02:00
dwarning 0b6a937537 no need for extra run 2023-08-04 15:00:36 +02:00
Brian Taylor ea685d3c64 For d0_eff, d0_gff timing models specify the 1.0e-12 minimum Xspice delay valuesrather than defaulting to 1ns. 2023-08-04 11:29:20 +02:00
Holger Vogt 4246b31126 Revert "Marcel Hendrix's fix for Bug #324 -"
This reverts commit d3a8634afe.
2023-07-30 16:01:15 +02:00
Holger Vogt f548e8400a eprvcd [-a] [-t timescale] node node ...
timescale is now given by minimum 1fs, maximum 1s.
2023-07-30 14:44:07 +02:00
Holger Vogt adea3dca5e 'current time' instead of 'actual time' 2023-07-30 14:42:09 +02:00
Holger Vogt f4711676a5 better visibility 2023-07-30 08:41:54 +02:00
Holger Vogt 7e91a23804 Remove vs2022 linker warning (ctx potentially uninitialized) 2023-07-30 08:40:57 +02:00
Holger Vogt b6585c8e14 replace exp10() by pow(10, ...),
exp10 not available in VS2022
2023-07-30 08:39:47 +02:00
Holger Vogt 2e3af2658a fopen_with_path enable path search (directory of recent inputs or
NGSPICE_INPUT_DIR)
2023-07-30 08:37:55 +02:00
Giles Atkinson 22af06585e Add example of reading S-parameters from a Touchstone file. 2023-07-29 10:36:36 +01:00
Giles Atkinson e0f618b5db Add a comment to say that LT/PSPICE compatability is needed. 2023-07-29 09:42:06 +01:00
Giles Atkinson c61543a4f3 Fix Bug #629 - "XSPICE d_osc failures". The old code has been completely
replaced by a new design that is faster, more reliable and does not
usually insert analog breakpoints.
2023-07-29 09:41:13 +01:00
Giles Atkinson 54b8171c53 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-29 09:37:57 +01:00
Giles Atkinson bead3e3249 Add an option for parameters to the xfer code model to be provided
in a Touchstone-format file instead of as a model parameter.
The change to mif_inp2.c allows the "table" parameter to be omitted.
2023-07-29 09:34:12 +01:00
Giles Atkinson d3a8634afe Marcel Hendrix's fix for Bug #324 -
Difference between file and line input for '];'
2023-07-29 09:30:51 +01:00
Giles Atkinson e9386155a6 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-29 09:16:01 +01:00
Brian Taylor 8f3c83f776 Example for 7490a Pspice subckt. This exercises jkff, logicexp, and pindly conversions to XSPICE. 2023-07-25 17:32:26 +02:00
Holger Vogt c9548c10c9 Prevent crash when number of parameter dependencies increases beyond
limit. Raise the limit from 100 to 200.
2023-07-25 15:18:02 +02:00
Holger Vogt a5535d18d0 re-enable rcheck debug output with WINGUI 2023-07-25 15:16:33 +02:00
Holger Vogt d1187e9a34 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-24 14:18:05 +02:00
Holger Vogt 9a6d950159 Make status report (MS Windows only) a little smarter. 2023-07-22 17:10:30 +02:00
Holger Vogt 7027a49663 Add an option nginfo to enable a status report during simulation
(currently available only with MS Windows GUI version).
2023-07-22 16:03:34 +02:00
Holger Vogt f46f481942 Remove compiler warnings (VS2022) 2023-07-22 10:30:37 +02:00
Brian Taylor 752c4936c0 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-22 10:19:27 +02:00
Giles Atkinson 3f3c4dc6aa Allow netlist lines to grow during parameter substitution,
removing a 25-character limit on the size of string parameters.
2023-07-21 08:47:10 +02:00
Giles Atkinson 1876e59aaf Fix the NAND and NOR variants of XSPICE code model multi_input_pwl
and add an example of its use with the E-source NAND variant.
2023-07-21 08:47:04 +02:00
Giles Atkinson 53b1bf1800 Fix Bug 584 - "XSPICE dac_bridge model shows incorrect output timing."
Remove reliance on exact breakpoint timing and tidy code.
2023-07-21 08:46:54 +02:00
Holger Vogt ef38b54d3c Change message from Circuit2 to Parse 2023-07-21 08:40:26 +02:00
Brian Taylor 50b9a55392 Simplify expression nesting depth. 2023-07-11 09:48:16 +02:00
Brian Taylor 1e58692e6d The channel data needs to be freed for some 2D Cider devices. This shows up with some of the examples/cider/parallel circuits. 2023-07-11 09:48:10 +02:00
Holger Vogt c6edbe44db Move extern declaration to the top, out of any function.
Thus remove VC2022 compiler warnings.
2023-07-04 12:07:41 +02:00
Brian Taylor f3b83fd4e4 Tidy up sp_shutdown with Cider. 2023-07-04 11:46:40 +02:00
Brian Taylor b63f6e7905 When Cider models are present, a normal batch mode sp_shutdown (for example, ngspice -b cmosinv.cir) will call com_quit(NULL). This cleans up so that valgrind will find no leaks in Cider devices after sp_shutdown. To disable this feature, set the environment variable CIDER_COM_QUIT="OFF". Even though it really does not matter that Cider memory is cleared just before exit, it makes it cleaner for valgrind checks. 2023-07-04 11:46:35 +02:00
Holger Vogt 486b74f728 Prevent a crash if p==NULL (due to buggy input) 2023-07-04 11:45:27 +02:00
dwarning 4c4a9c78ec ifft: in case input array is smaller then output array - fill in the rest with zero to prevent uninitialzed plot variables 2023-07-03 10:07:32 +02:00
dwarning e83fae11bc same array size for in- and output in inverse fft function from fftw3 2023-07-02 16:16:51 +02:00
Brian Taylor 40a89b16e6 Fix the Cider memory leaks from setupContacts. TWOdestroy needed to free the contact nodes. 2023-06-30 11:03:53 +02:00
Brian Taylor 92dcb76251 Add DEVmodDelete functions to reduce memoory leaks in Cider models. The model memory was not freed during remcirc or quit. In the future, some of the code duplication could be refactored. The cmosinv.cir is now down to just 1 memory leak. 2023-06-30 11:03:42 +02:00
Brian Taylor cbda9ab7b5 The CONTACT statement does not apply to 1D devices. 2023-06-25 21:25:26 +02:00
Brian Taylor 42a8bafd10 Fix some more memory leaks in the CIDER 1D and 2D destroy functions. 2023-06-25 21:24:57 +02:00
Giles Atkinson d4c4ac7937 Fix sluggish output of the "Reference value" progress indicator on Linux
after it switched from stderr to stdout (28a3413).  Add fflush().
2023-06-24 17:24:21 +02:00
Giles Atkinson b62c9b1ef3 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-06-24 17:24:15 +02:00
Giles Atkinson e0cc583669 Set default colours for the button box in the X11 plot window that
match the default dark background of the plot.
2023-06-24 17:24:09 +02:00
Brian Taylor 0f15c1ab96 Add missing FREE to reduce some of the Cider memory leaks. 2023-06-20 22:57:34 +02:00
Giles Atkinson 22b5a859d0 Further fix for PWL bugs introduced by 9c71db3 (Fix for Bug #607) and
partially fixed by 79c69e0 and 9c75367.  This also fixes Bug #468 -
"Bugs in src/spicelib/devices/vsrc/vsrcacct.c for PWL source."
2023-06-20 20:01:51 +02:00
Giles Atkinson 1a056f935c Add an option to the iplot command: -d sets the number of simulation
steps before the window is shown.  The value can be chosen to
limit rapid resizing when starting and that is used in the PLL examples.
2023-06-20 20:01:41 +02:00
Giles Atkinson 8ce190e7d6 Improve commands for vector scales. "setscale" can now change
or clear the scale of an individual vector and "compose" can
explicitly create a vector from XSPICE event node history.
2023-06-20 20:01:31 +02:00
Holger Vogt 64cbf224b5 Error print output consistenly only to stderr.
Replace out_printf by fprint(stderr, ...
2023-06-20 19:56:55 +02:00
Holger Vogt 3fd7bd2183 Prevent crash when ControlledExit* is not initialized
in ngspice shared library.
2023-06-18 10:32:01 +02:00