Holger Vogt
7dd44f12e0
Do not set a breakpoint at current time,
...
as this may lead to trigger a "breakpoint in the past"
message and stop the simulation, depending on double
precision details during comparison.
2023-08-14 15:38:25 +02:00
holger
57c880b6a3
Prepare ngspice-41
2023-08-13 14:03:34 +02:00
Holger Vogt
9ee9f9262b
Prevent buffer overflow, remove unused
2023-08-13 11:33:19 +02:00
Holger Vogt
563aa2917a
Remove unused variable
2023-08-13 11:32:57 +02:00
Holger Vogt
bd85b27349
Replace | by ||,
...
bug detected by code analysis
2023-08-13 11:32:51 +02:00
Holger Vogt
4432987919
Initialize to remove VS2022 linker warnings
2023-08-13 11:32:38 +02:00
Holger Vogt
cb0e794907
Prevent buffer overflow, remove unused
2023-08-13 11:31:01 +02:00
Holger Vogt
6eb7e0ec82
Remove unused variable
2023-08-13 11:04:34 +02:00
Holger Vogt
e1e2d8a88a
Replace | by ||,
...
bug detected by code analysis
2023-08-13 11:04:19 +02:00
Holger Vogt
d90c9dd3b5
Initialize to remove VS2022 linker warnings
2023-08-13 10:01:12 +02:00
Holger Vogt
de98e49956
Set brackets to remove gcc compiler warning
2023-08-12 23:59:56 +02:00
Holger Vogt
ddd0effd27
Set brackets to remove gcc compiler warning
2023-08-12 23:57:38 +02:00
Giles Atkinson
ad02a7c47a
Remove duplicate definition of variable idp, as compiler may warn.
2023-08-12 22:46:16 +02:00
Giles Atkinson
62b7247087
Remove duplicate definition of variable idp, as compiler may warn.
2023-08-12 18:14:40 +01: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
Holger Vogt
d173deea64
Activate callback, remove memory leak
2023-08-12 15:10:49 +02:00
Holger Vogt
0db8d3b956
Reemove needless code, check for '}0',
...
don't do anything here if not true m=something
2023-08-12 14:55:48 +02:00
Holger Vogt
2f369d5435
Remove gcc compiler warning: remove needless code
2023-08-12 14:19:29 +02:00
Holger Vogt
c33bcafb34
Remove buggy if clause, add safeguards against buggy input
2023-08-12 13:55:51 +02:00
Holger Vogt
550f563e0d
Remove gcc compiler warnings
2023-08-12 12:30:47 +02:00
Holger Vogt
51e8f4311e
Activate callback, remove memory leak
2023-08-12 12:25:35 +02:00
Giles Atkinson
738881a014
Complete version of intertial delay for d_tristate. The State and
...
Strength members are treated independently and combined in the output.
2023-08-11 11:40:02 +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
Giles Atkinson
ee7250e11f
Fix a crash when trying to auto-bridge a real-valued event node
...
and improve an error message.
2023-08-11 11:38:45 +02:00
dwarning
53af7d179b
decrease iteration count for low base biasing
2023-08-11 11:38:24 +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
Giles Atkinson
5638008a7f
Complete version of intertial delay for d_tristate. The State and
...
Strength members are treated independently and combined in the output.
2023-08-09 08:28:40 +01:00
Giles Atkinson
c02de13e10
Fix an infinite loop bug that may be seen with "stop whan a>b" or
...
"stop when a<>b".
2023-08-08 11:59:51 +01: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
Brian Taylor
7840547408
Add support for PSpice DLYLINE.
2023-08-06 12:25:25 +02:00
Giles Atkinson
f1cd9c2596
Fix a crash when trying to auto-bridge a real-valued event node
...
and improve an error message.
2023-08-05 13:52:44 +01:00
dwarning
93443b988e
decrease iteration count for low base biasing
2023-08-04 21:45:12 +02:00
Holger Vogt
aecf5cdcba
Fix comment on old-style .lib
2023-08-04 20:11:39 +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
75ce3c95e3
eprvcd [-a] [-t timescale] node node ...
...
timescale is now given by minimum 1fs, maximum 1s.
2023-07-31 14:30:53 +02:00
Holger Vogt
7c0bbcd9b2
Remove vs2022 linker warning (ctx potentially uninitialized)
2023-07-31 14:30:29 +02:00
Holger Vogt
da3dda3269
replace exp10() by pow(10, ...),
...
exp10 not available in VS2022
2023-07-31 14:30:21 +02:00
Holger Vogt
dc5291fa91
fopen_with_path enable path search (directory of recent inputs or
...
NGSPICE_INPUT_DIR)
2023-07-31 14:30:13 +02:00
Giles Atkinson
4df2e69009
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-31 14:29:36 +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
4cc0ac846d
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-31 14:28:40 +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
18911b06b6
re-enable rcheck debug output with WINGUI
2023-07-31 14:27:35 +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
6c48657896
Make status report (MS Windows only) a little smarter.
2023-07-31 14:27:13 +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
Giles Atkinson
576f218945
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-31 14:25:40 +02:00
Giles Atkinson
3a260fd4d9
Fix Bug 584 - "XSPICE dac_bridge model shows incorrect output timing."
...
Remove reliance on exact breakpoint timing and tidy code.
2023-07-31 14:25:31 +02:00
Holger Vogt
bc41e48126
Change message from Circuit2 to Parse
2023-07-31 14:25:23 +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
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
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
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
4d8b105b86
Simplify expression nesting depth.
2023-07-15 11:34:09 +02:00
Brian Taylor
251f1e1984
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-15 11:33:52 +02:00
Holger Vogt
d74e43f0f0
Move extern declaration to the top, out of any function.
...
Thus remove VC2022 compiler warnings.
2023-07-15 11:33:11 +02:00
Brian Taylor
159e185bfe
Tidy up sp_shutdown with Cider.
2023-07-15 11:32:52 +02:00
Brian Taylor
51b361bbf0
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-15 11:32:37 +02:00
Holger Vogt
ba2842b55a
Prevent a crash if p==NULL (due to buggy input)
2023-07-15 11:32:26 +02:00
dwarning
794a37339a
ifft: in case input array is smaller then output array - fill in the rest with zero to prevent uninitialzed plot variables
2023-07-15 11:32:11 +02:00
dwarning
42b803e5c2
same array size for in- and output in inverse fft function from fftw3
2023-07-15 11:31:59 +02:00
Brian Taylor
25c1c971e5
Fix the Cider memory leaks from setupContacts. TWOdestroy needed to free the contact nodes.
2023-07-15 11:31:48 +02:00
Brian Taylor
f39f89ea9b
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-07-15 11:31:38 +02:00
Brian Taylor
db8ac72199
The CONTACT statement does not apply to 1D devices.
2023-07-15 11:31:24 +02:00
Brian Taylor
844ea11a63
Fix some more memory leaks in the CIDER 1D and 2D destroy functions.
2023-07-15 11:31:14 +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
Giles Atkinson
1c1a53bac8
Set default colours for the button box in the X11 plot window that
...
match the default dark background of the plot.
2023-07-15 11:30:29 +02:00
Brian Taylor
80e44a32d6
Add missing FREE to reduce some of the Cider memory leaks.
2023-07-15 11:30:02 +02:00
Giles Atkinson
5f6a6a27d8
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-07-15 11:29:51 +02:00
Giles Atkinson
5114d6c2f4
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-07-15 11:29:32 +02:00
Giles Atkinson
e5a931e537
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-07-15 11:28:48 +02:00
Holger Vogt
d3dccc68b2
Error print output consistenly only to stderr.
...
Replace out_printf by fprint(stderr, ...
2023-07-15 11:28:25 +02:00
Holger Vogt
87f0db6f50
Prevent crash when ControlledExit* is not initialized
...
in ngspice shared library.
2023-07-15 11:28:07 +02:00
Holger Vogt
b0f2ab8764
Fix bug 637
...
Prevent crash when external current source is used.
2023-07-15 11:27:43 +02:00
Holger Vogt
90d8f7f34f
Prevent crash if EXTERNAL voltage source is used
...
Fixes
98763c0ad ("Note: ix: dc value used for op instead of transient time=0 value Former warning message or note only issued when dc value and value at transient time=0 differ.", 2022-09-20)
2023-07-15 11:27:32 +02:00
Holger Vogt
4421d95379
improve comment
2023-07-15 11:27:14 +02:00
Holger Vogt
a28784d6d7
Prevent crash if *line == NULL
2023-07-15 11:26:52 +02:00
Holger Vogt
53b72a7693
Skip title line when resorting .params, .meas, .temp
2023-07-15 11:25:27 +02:00
Giles Atkinson
762b131bb3
Fix Bug #635 - "Starting ngspice with HOME env variable unset causes segfault".
2023-07-15 11:22:13 +02:00
Holger Vogt
eda9cadbed
The 'plot' command is not available in batch mode.
...
Issue a warning and ignore it.
2023-07-15 11:22:00 +02:00
Holger Vogt
0e6b785728
Remove the error message when a simulation has been started via the .control section.
2023-07-15 11:21:40 +02:00
Holger Vogt
f5091bdc2d
Make the error message a little more reasonable.
...
Unfortunately the current setup does not easily allow naming
the offending command.
2023-07-15 11:21:11 +02:00
Holger Vogt
c7ebb7aabb
Error message up to now was strictly for command line interactive use only.
...
Improve error message when parsing .ac lines.
2023-07-15 11:20:41 +02:00
Holger Vogt
d46cd894cc
Prevent crash if s == NULL
2023-07-15 11:20:09 +02:00
Holger Vogt
7f8e1cecab
Allow ';' also at the beginning of a line.
2023-07-15 11:19:57 +02:00
Holger Vogt
c1db561373
No syntax check for title line
2023-07-15 11:19:31 +02:00
Holger Vogt
0c1f114dea
add comment
2023-07-15 11:19:03 +02:00
Holger Vogt
cb9cc7140d
Prevent crash if no or not enough coeffs are given.
...
r is then probably not the repeat coefficient.
2023-07-15 11:18:36 +02:00
Holger Vogt
3420e66705
During syntax check: v,i sources need two nodes,
...
and prevent crash upon buggy ac input.
2023-07-15 11:18:09 +02:00
Holger Vogt
29c51c0d30
Bail out if {...} or '...' are missing around RHS of the equation.
...
(...) may be possible, elsewhere additional {} are put around,
so we have {(...)}.
2023-07-15 11:17:34 +02:00
Holger Vogt
0ee5e3f32a
Add a control language function cvector, to create a complex vector.
...
Let vec1 = cvector(50)
will generate a complex vector, with the real part values
increasing from 0 to 49, the imaginary values are set to 0.
Useful in ac loops to store result data.
2023-07-15 11:17:10 +02:00
Holger Vogt
01e8b4da84
Prevent crash upon buggy user input (missing ] or >)
2023-07-15 11:16:57 +02:00
Holger Vogt
1340002c05
Improve error message
2023-07-15 11:16:43 +02:00
Holger Vogt
fc169fe23f
CIDER: Plug some memory leak
2023-07-15 11:16:22 +02:00
Holger Vogt
67b2ddbad5
CIDER: Plug some memory leaks by adding to TWOdestroy()
2023-07-15 11:16:13 +02:00
Holger Vogt
3bb9cd738f
CIDER: Plug small memory leaks in INPparseNumMod()
2023-07-15 11:16:01 +02:00
Holger Vogt
695c1e1bd6
Add an extra model stitching for CIDER only.
...
This one fills in actualLine, which is use by
parsing the CIDER model parameters in INPparseNumMod()
from inpgmod.c
2023-07-15 11:15:50 +02:00
Giles Atkinson
d31568bd83
Add parsing and translation of the FREQ form of E-source devices,
...
integrated with the existing parsing of AND/NAND/OR/NOR forms (inpcom.c).
For the implementation, add a new analog XSPICE code model, xfer.
Add an example to examples/sp.
2023-07-15 11:15:08 +02:00
Giles Atkinson
1fdf7dac51
Fix Bug #623 - "Parser warning for voltage source".
...
Do not warn when a single-element vector lacks parentheses.
2023-07-15 11:14:57 +02:00
Giles Atkinson
422a205409
Always propgate any individual scale for a vector that appears
...
in an expression, resolving conflicts by matching length and warning
only when making an arbitary choice. One effect of this is that it
is now possible to mix analog nodes with offset digital nodes
(an expression like dvalue+6) without a warning and get a correct plot.
2023-07-15 11:14:35 +02:00
Giles Atkinson
eeb912228a
When creating a plot vector from XSPICE event history, add a
...
final point at the end of the vector, so that a plotted line
does not end at the last event, leaving an odd spike.
2023-07-15 11:13:19 +02:00
Giles Atkinson
2db6b529f2
Fix Bug #630 - "pwl if r=last time, simulation never ends".
...
Allowing a PWL repeat to start at the last time-point makes no sense.
2023-07-15 11:13:05 +02:00
Giles Atkinson
f4f2f41940
Fix another error in 9c71db3a72.
2023-07-15 11:12:52 +02:00
Giles Atkinson
9099a922fd
Apply a patch from Aleksey Morozov to fix a bug that he identified
...
and reproduced. It is the same as Bug #331 -
"XSpice skips digital output point" except that it applies to the
instance queue, not the event queue.
2023-07-15 11:12:31 +02:00
Holger Vogt
ee7bcac256
Reduce excessive use of TREALLOC
2023-07-15 11:12:10 +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
Holger Vogt
8d9695d7d6
Fix bug 637
...
Prevent crash when external current source is used.
2023-06-18 10:29:43 +02:00
Holger Vogt
82796a6fa6
Prevent crash if EXTERNAL voltage source is used
...
Fixes
98763c0ad ("Note: ix: dc value used for op instead of transient time=0 value Former warning message or note only issued when dc value and value at transient time=0 differ.", 2022-09-20)
2023-06-14 15:34:45 +02:00
Holger Vogt
5761b71ecd
improve comment
2023-06-13 20:06:27 +02:00
Holger Vogt
a244e023c4
Prevent crash if *line == NULL
2023-06-13 20:05:49 +02:00
Holger Vogt
818bd19798
Revert "Prevent crash if *line == NULL"
...
This reverts commit b72f9516ac .
2023-06-13 20:02:27 +02:00
Holger Vogt
216e5cb58b
Skip title line when resorting .params, .meas, .temp
2023-06-13 19:57:19 +02:00
Holger Vogt
b72f9516ac
Prevent crash if *line == NULL
2023-06-13 19:56:07 +02:00
Giles Atkinson
2740d9a79b
Fix Bug #635 - "Starting ngspice with HOME env variable unset causes segfault".
2023-06-13 19:54:49 +02:00
Holger Vogt
bda4a83dc6
Revert "Skip the title line when re-sorting parameters"
...
This reverts commit 72496da4c9 .
2023-06-12 23:20:46 +02:00
Holger Vogt
630e800bd6
The 'plot' command is not available in batch mode.
...
Issue a warning and ignore it.
2023-06-09 16:31:04 +02:00
Holger Vogt
28f641b318
Remove the error message when a simulation has been started via the .control section.
2023-06-09 16:10:37 +02:00
Holger Vogt
d76e7362e7
Make the error message a little more reasonable.
...
Unfortunately the current setup does not easily allow naming
the offending command.
2023-06-09 16:09:57 +02:00
Holger Vogt
cdf66fac6b
Error message up to now was strictly for command line interactive use only.
...
Improve error message when parsing .ac lines.
2023-06-09 14:45:43 +02:00
Holger Vogt
72496da4c9
Skip the title line when re-sorting parameters
...
and removing .meas statement.
2023-06-09 14:44:40 +02:00
Holger Vogt
bf1dfa0127
Prevent crash if s == NULL
2023-06-07 16:25:24 +02:00
Holger Vogt
5e73be130a
Allow ';' also at the beginning of a line.
2023-06-04 14:53:38 +02:00
Holger Vogt
a99caf504f
No syntax check for title line
2023-06-04 14:36:27 +02:00
Holger Vogt
1ff095321c
add comment
2023-06-04 14:36:03 +02:00
Holger Vogt
525d221325
Prevent crash if no or not enough coeffs are given.
...
r is then probably not the repeat coefficient.
2023-06-04 14:23:09 +02:00
Holger Vogt
6dc09e6592
During syntax check: v,i sources need two nodes,
...
and prevent crash upon buggy ac input.
2023-06-04 14:01:44 +02:00
Holger Vogt
1ddb1f58b4
Bail out if {...} or '...' are missing around RHS of the equation.
...
(...) may be possible, elsewhere additional {} are put around,
so we have {(...)}.
2023-06-04 10:36:21 +02:00
Holger Vogt
3a535f19db
Add a control language function cvector, to create a complex vector.
...
Let vec1 = cvector(50)
will generate a complex vector, with the real part values
increasing from 0 to 49, the imaginary values are set to 0.
Useful in ac loops to store result data.
2023-06-04 09:46:13 +02:00
Holger Vogt
10e86d72d3
Prevent crash upon buggy user input (missing ] or >)
2023-06-03 17:09:10 +02:00
Holger Vogt
a03369fc12
Improve error message
2023-06-03 15:48:06 +02:00
Holger Vogt
7de5fd276e
CIDER: Plug some memory leak
2023-06-02 22:30:27 +02:00
Holger Vogt
27173c9622
CIDER: Plug some memory leaks by adding to TWOdestroy()
2023-06-02 19:44:34 +02:00
Holger Vogt
5ba0177f21
CIDER: Plug small memory leaks in INPparseNumMod()
2023-06-02 19:43:47 +02:00
Holger Vogt
981c63f1ab
Add an extra model stitching for CIDER only.
...
This one fills in actualLine, which is use by
parsing the CIDER model parameters in INPparseNumMod()
from inpgmod.c
2023-06-02 15:31:28 +02:00
Giles Atkinson
e61db1d2cd
Add parsing and translation of the FREQ form of E-source devices,
...
integrated with the existing parsing of AND/NAND/OR/NOR forms (inpcom.c).
For the implementation, add a new analog XSPICE code model, xfer.
Add an example to examples/sp.
2023-05-31 16:04:51 +02:00
Giles Atkinson
37453db34d
Fix Bug #623 - "Parser warning for voltage source".
...
Do not warn when a single-element vector lacks parentheses.
2023-05-29 09:47:44 +01:00
Giles Atkinson
94da54bcea
Always propgate any individual scale for a vector that appears
...
in an expression, resolving conflicts by matching length and warning
only when making an arbitary choice. One effect of this is that it
is now possible to mix analog nodes with offset digital nodes
(an expression like dvalue+6) without a warning and get a correct plot.
2023-05-29 09:47:27 +01:00
Giles Atkinson
d55143edca
When creating a plot vector from XSPICE event history, add a
...
final point at the end of the vector, so that a plotted line
does not end at the last event, leaving an odd spike.
2023-05-29 09:47:03 +01:00
Giles Atkinson
0616965a67
Fix Bug #630 - "pwl if r=last time, simulation never ends".
...
Allowing a PWL repeat to start at the last time-point makes no sense.
2023-05-29 09:19:18 +01:00
Giles Atkinson
9c75367cfb
Fix another error in 9c71db3a72.
2023-05-29 09:19:18 +01:00
Giles Atkinson
6c420525d0
Apply a patch from Aleksey Morozov to fix a bug that he identified
...
and reproduced. It is the same as Bug #331 -
"XSpice skips digital output point" except that it applies to the
instance queue, not the event queue.
2023-05-29 09:19:18 +01:00
Holger Vogt
1cd15e382e
Reduce excessive use of TREALLOC
2023-05-27 16:44:30 +02:00
Holger Vogt
a56b8b2190
Revert "Reduce excessive use of TREALLOC"
...
This reverts commit 6c64d463c8 .
2023-05-27 16:17:23 +02:00
Holger Vogt
fd24e5af7e
re-formatting the code
2023-05-27 10:50:14 +02:00
Holger Vogt
d295fe3ac6
Slightly improve error handling and warning message
2023-05-27 10:50:02 +02:00
Holger Vogt
823465ceb8
.csparam: Add some safeguarding against wrong input and crash,
...
allow multiple parameters in a .csparam row (like .param).
2023-05-27 10:49:53 +02:00
Holger Vogt
b24c613ce6
Safeguard against bad arguments (no crash upon NULL)
2023-05-27 10:49:19 +02:00
Holger Vogt
ba7ad783a8
safeguard against crash upon buggy input
2023-05-27 10:49:07 +02:00
Holger Vogt
c723e124d9
Make error message more verbose and useful
2023-05-27 10:48:57 +02:00
Holger Vogt
9b3146b1fb
Correct the warning message
2023-05-27 10:48:41 +02:00
Holger Vogt
e834c89313
Prevent a crash when number of nodes differs in subckt and X call.
2023-05-27 10:48:30 +02:00
Holger Vogt
8c9602574e
Improve error messages
2023-05-27 10:48:15 +02:00
Holger Vogt
6ea2882c3b
Plug a memory leak
2023-05-27 10:48:00 +02:00