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
Holger Vogt
96bebafac5
Enable history substitution of interactive commands only when variable 'histsubst' is set.
...
This feature is in conflict with ! (logic inversion)
in .control language logic expressions.
2023-05-27 10:47:27 +02:00
Pascal Kuthe
e5d1885e39
make accessible
2023-05-27 10:47:11 +02:00
Giles Atkinson
45015f974d
Add a "-w" option to the iplot command. It sets a width for the
...
window (in the current scale units) so that it does not re-scale
on overflow, but instead plots recently-generated data on a fixed scale.
2023-05-27 10:46:45 +02:00
Giles Atkinson
7a5514a1ff
In graf.c change local function set() to do what you might expect,
...
rather than the opposite. Also fix a debug message.
2023-05-27 10:46:24 +02:00
Giles Atkinson
1a97e1097f
Fix error in previous fix for Bug #607 -
...
"DC Source with Pulse stops pulsing half way through simulation".
Non-periodic PWL waveforms reverted to zero on termination.
2023-05-27 10:46:16 +02:00
Holger Vogt
923f7efab0
Prevent crash (seg fault), if measure statement is incomplete
2023-05-27 10:46:01 +02:00
Holger Vogt
66a4b2226e
.libsave: don't save the command itself, improve messaging
2023-05-27 10:44:56 +02:00
Holger Vogt
006a66b055
.libsave: Print to file the expanded library read by .lib
2023-05-27 10:44:04 +02:00
Holger Vogt
b6e9ba20b9
Add another error qualifier to decribe the current policy
...
when a doubling token exists (or is created) in the netlist.
2023-05-27 10:43:40 +02:00
Holger Vogt
c6efc6bc9c
Send 'refernce value' to stdout, not to stderr
2023-05-27 10:43:16 +02:00
Giles Atkinson
ad5bb9eb8d
Fix Bug #607 -
...
"DC Source with Pulse stops pulsing half way through simulation".
Do not require breakpoints to be hit almost exactly before scheduling
the next one. That may cause the next breakpoint to be lost.
2023-05-27 10:43:01 +02:00
Holger Vogt
50a9daf24a
Line concatenation: use dstring instead of tprintf:
...
Parsing time of Skywater libs reduced by more than 35%.
2023-05-27 10:42:47 +02:00
Holger Vogt
972ff885d0
Suppress (rare) crashes during setiup
...
if device or model lists are missing.
2023-05-27 10:42:27 +02:00
Holger Vogt
6c9994ea9f
Remove linker warnings in MSVC
2023-05-27 10:42:12 +02:00
Holger Vogt
0b73d95f13
Formatting
2023-05-27 10:41:56 +02:00
Holger Vogt
962d9d2998
Avoid user induced buffer overflows.
...
Check against NULL pointer.
2023-05-27 10:41:49 +02:00
Holger Vogt
d2177bbd69
Prevent reading from NULL
2023-05-27 10:41:40 +02:00
dwarning
924dc10368
get the right place for variable declaration
2023-05-27 10:41:29 +02:00
dwarning
a4f6a777c0
few cleanings to prevent compiler warnings
2023-05-27 10:41:21 +02:00
dwarning
5c32a3fb9c
prevent unitialized variables
2023-05-27 10:41:12 +02:00
Brian Taylor
6b85bcb805
Allocate compound gate connectors where needed.
2023-05-27 10:41:04 +02:00
Brian Taylor
de34a90bb4
Create correct translations of degenerate compound gates with $d_hi/$d_lo inputs.
2023-05-27 10:40:51 +02:00
Holger Vogt
a39052cd14
Make voltage ramp smooth around 0 and around end of ramp.
2023-05-27 10:40:42 +02:00
Holger Vogt
678a6582f6
A preliminary fix to reduce the amount of missing pulses considerably.
...
Probably not yet the final solution.
2023-05-27 10:40:32 +02:00
Holger Vogt
4231ad3f5f
Prevent reading from NULL when user input is something like .ic=v
2023-05-27 10:40:24 +02:00
dwarning
02109587ee
not to forget the overlap capacitances in AC
2023-05-27 10:40:08 +02:00
dwarning
56b5041266
selfheating only with rth>0
2023-05-27 10:39:48 +02:00
dwarning
2fff3e2bc0
use true vector size for memcpy
2023-05-27 10:39:39 +02:00
dwarning
de09636d1a
general update: fix temperature update, improve performance
2023-05-27 10:39:33 +02:00
dwarning
f33e899fda
white spaces
2023-05-27 10:39:25 +02:00
dwarning
d053fbda93
vbic: correct soa-check warning for C-S branch
2023-05-27 10:39:14 +02:00
Holger Vogt
797795e7c0
Shift all compatibility handlinmg from inpcom.c into its own source files
...
inpcompat.c and inpcompat.h
2023-05-27 10:39:05 +02:00
Brian Taylor
14a403e193
Use ~ on the input of a tristate buffer for INV3, and avoid creating an extra inverter. For ff/latch use ~ on set/reset and jkff clock inputs to avoid creating extra inverters.
2023-05-27 10:38:40 +02:00
dwarning
b5d5cfd543
vbic: selfheating switch selft has priority, but keep compatibility
2023-05-27 10:38:25 +02:00
Holger Vogt
6c64d463c8
Reduce excessive use of TREALLOC
2023-05-26 13:31:08 +02:00
Holger Vogt
5f39fd80fb
re-formatting the code
2023-05-26 12:16:55 +02:00
Holger Vogt
61f7188ef0
Slightly improve error handling and warning message
2023-05-22 15:18:39 +02:00
Holger Vogt
3071cdd2d5
.csparam: Add some safeguarding against wrong input and crash,
...
allow multiple parameters in a .csparam row (like .param).
2023-05-22 14:46:17 +02:00
Holger Vogt
edf2c625e1
Safeguard against bad arguments (no crash upon NULL)
2023-05-17 10:08:38 +02:00
Holger Vogt
b271b6d9e3
safeguard against crash upon buggy input
2023-05-17 09:32:23 +02:00
Holger Vogt
2206956bc1
Make error message more verbose and useful
2023-05-13 23:43:44 +02:00
Holger Vogt
73e3e7f952
Correct the warning message
2023-05-12 20:02:31 +02:00
Holger Vogt
b97c273805
Prevent a crash when number of nodes differs in subckt and X call.
2023-05-12 17:00:08 +02:00
Holger Vogt
8b8200df88
Improve error messages
2023-05-12 16:59:27 +02:00
Holger Vogt
1f58cd7618
Plug a memory leak
2023-05-08 20:18:55 +02:00
Holger Vogt
5047a19112
Enable history substitution of interactive commands only when variable 'histsubst' is set.
...
This feature is in conflict with ! (logic inversion)
in .control language logic expressions.
2023-05-07 15:48:06 +02:00
Pascal Kuthe
48668c7d6e
make accessible
2023-05-07 15:07:08 +02:00
Giles Atkinson
fdb8ee3806
Add a "-w" option to the iplot command. It sets a width for the
...
window (in the current scale units) so that it does not re-scale
on overflow, but instead plots recently-generated data on a fixed scale.
2023-05-02 13:13:02 +01:00
Giles Atkinson
81e07e8ece
In graf.c change local function set() to do what you might expect,
...
rather than the opposite. Also fix a debug message.
2023-05-02 12:52:45 +01:00
Giles Atkinson
79c69e0644
Fix error in previous fix for Bug #607 -
...
"DC Source with Pulse stops pulsing half way through simulation".
Non-periodic PWL waveforms reverted to zero on termination.
2023-04-26 21:38:25 +01:00
Holger Vogt
675b9e6fa2
Prevent crash (seg fault), if measure statement is incomplete
2023-04-26 17:06:39 +02:00
Holger Vogt
dfb53459dc
.libsave: don't save the command itself, improve messaging
2023-04-26 11:26:11 +02:00
Holger Vogt
ff9ff26613
.libsave: Print to file the expanded library read by .lib
2023-04-26 11:26:04 +02:00
Holger Vogt
81012de4d0
Add another error qualifier to decribe the current policy
...
when a doubling token exists (or is created) in the netlist.
2023-04-25 14:37:00 +02:00
Holger Vogt
28a3413dd2
Send 'refernce value' to stdout, not to stderr
2023-04-25 14:34:51 +02:00
Giles Atkinson
9c71db3a72
Fix Bug #607 -
...
"DC Source with Pulse stops pulsing half way through simulation".
Do not require breakpoints to be hit almost exactly before scheduling
the next one. That may cause the next breakpoint to be lost.
2023-04-22 14:56:01 +02:00
Holger Vogt
5bd0346b64
Line concatenation: use dstring instead of tprintf:
...
Parsing time of Skywater libs reduced by more than 35%.
2023-04-22 14:55:23 +02:00
Holger Vogt
f5279c0ef5
Suppress (rare) crashes during setiup
...
if device or model lists are missing.
2023-04-18 10:48:08 +02:00
Holger Vogt
ee238b1632
Remove linker warnings in MSVC
2023-04-17 15:03:53 +02:00
Holger Vogt
9bc9d94244
Formatting
2023-04-17 15:00:28 +02:00
Holger Vogt
c179b01734
Avoid user induced buffer overflows.
...
Check against NULL pointer.
2023-04-17 13:53:37 +02:00
Holger Vogt
200cff4bdc
Prevent reading from NULL
2023-04-17 11:54:25 +02:00
dwarning
7fc90a332a
get the right place for variable declaration
2023-04-15 17:42:20 +02:00
dwarning
4fed4bafa1
few cleanings to prevent compiler warnings
2023-04-15 16:57:33 +02:00
dwarning
77afc678dd
prevent unitialized variables
2023-04-15 13:50:05 +02:00
Brian Taylor
601d4bf57d
Allocate compound gate connectors where needed.
2023-04-15 11:35:39 +02:00
Brian Taylor
9f2192e711
Create correct translations of degenerate compound gates with $d_hi/$d_lo inputs.
2023-04-15 11:35:24 +02:00
Holger Vogt
4e51598562
Make voltage ramp smooth around 0 and around end of ramp.
2023-04-15 11:10:25 +02:00
Holger Vogt
c8a7f07ac1
A preliminary fix to reduce the amount of missing pulses considerably.
...
Probably not yet the final solution.
2023-04-15 10:52:59 +02:00
Holger Vogt
3d0fab9c55
Prevent reading from NULL when user input is something like .ic=v
2023-04-12 13:40:05 +02:00
dwarning
add9b1d77f
not to forget the overlap capacitances in AC
2023-04-10 11:36:20 +02:00
dwarning
af1963fc39
selfheating only with rth>0
2023-04-08 20:44:19 +02:00
dwarning
db9711daf4
use true vector size for memcpy
2023-04-08 17:29:25 +02:00
dwarning
c6a66c4c5e
general update: fix temperature update, improve performance
2023-04-08 17:10:04 +02:00
dwarning
03d5f5f1e1
white spaces
2023-04-08 17:00:02 +02:00
Holger Vogt
b9ac15acf2
Merge branch 'pre-master' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master
2023-04-08 15:25:16 +02:00
Holger Vogt
217e0577b8
Shift all compatibility handlinmg from inpcom.c into its own source files
...
inpcompat.c and inpcompat.h
2023-04-08 15:24:00 +02:00
dwarning
51802b8df2
vbic: correct soa-check warning for C-S branch
2023-04-03 11:30:16 +02:00
Brian Taylor
a531d8428c
Use ~ on the input of a tristate buffer for INV3, and avoid creating an extra inverter. For ff/latch use ~ on set/reset and jkff clock inputs to avoid creating extra inverters.
2023-04-02 23:08:52 +02:00
Holger Vogt
d4f49f1273
Merge branch 'pre-master' of ssh://git.code.sf.net/p/ngspice/ngspice into pre-master
2023-04-02 22:57:55 +02:00
dwarning
a3bc6ae744
vbic: selfheating switch selft has priority, but keep compatibility
2023-04-02 17:22:52 +02:00
Holger Vogt
d53acbed8e
Add noise capability to XSPICE code models
...
Coded according to acan., AC analysis
MIF_NOI is not yet supported by any code model, so
MIF_AC is used (code models behave like in ac mode,
they are noiseless.
2023-04-02 15:06:28 +02:00
Holger Vogt
3c41ab1190
Formatting with MSVC2022
2023-04-02 15:06:23 +02:00
Giles Atkinson
5aa48cab0b
Do not generate netlist lines that use non-existent libraries.
...
To support that, give global scope to function inp_pathresolve()
in inpcom.c. Update internal documentation (long comment).
2023-04-01 13:56:12 +02:00
Holger Vogt
8f8f7ff8ab
Command 'listing r': No extra formatting, truncation etc.
...
of netlist lines when printing to file or console.
2023-04-01 13:50:17 +02:00
Holger Vogt
95c4c0f587
Add inertial.h to the distributable headers
2023-03-25 15:36:15 +01:00
Holger Vogt
311ddeac0d
Prepare for ngspice-40
2023-03-24 22:27:12 +01:00
Holger Vogt
062785319a
When '.probe alli' is set, disable auto bridging and set a flag
2023-03-24 22:10:18 +01:00
Holger Vogt
ce38a768b5
typo
2023-03-24 22:10:12 +01:00
Holger Vogt
c30af55491
Add operating point information to SOA check,
...
using vbefwd, vbcfwd, and vsubfwd
Operating point heck is enabled by .options warn=2
2023-03-24 22:10:07 +01:00
Holger Vogt
443567dbaf
Add SOA-check for collector-substrate diode (model parameter bvsub)
2023-03-24 22:09:55 +01:00
Holger Vogt
ff77c583d7
Add model parameter selft, to switch on self-heating, default: off (selft=0)
2023-03-24 22:09:42 +01:00
Giles Atkinson
5197200fb3
Fix crash reported by Brian Taylor. If "source" is used after
...
analysis, the circuit is both deleted and destroyed. Beware of
double frees.
2023-03-22 14:30:18 +01:00
Giles Atkinson
98333ee89a
Fix a memory leak reported by Brian Taylor that was introduced
...
by commit 4d8e17487b .
2023-03-22 14:30:11 +01:00
Holger Vogt
82de3db8ad
VBIC: Add bvbe, bvbc, and bvce as redundant SOA parameters
2023-03-22 14:30:01 +01:00
Holger Vogt
f121c433a7
Check for buggy diode instance line, avoid crash
2023-03-22 14:29:48 +01:00
Holger Vogt
2ce18ab184
Add VDMOS default junction cap IRF540 IRF9540
2023-03-22 14:29:37 +01:00
Holger Vogt
2a647f8462
Set default VDMOS model parameters to resemble IRF540, 9540
2023-03-22 14:29:22 +01:00
Giles Atkinson
e25f8bd522
Add inertial delay to missed d_xnor and tidy blank lines in d_xor.
2023-03-22 14:29:03 +01:00
Giles Atkinson
cecce5163e
Inertial delay for remaining simple gates and buffers:
...
nand or xor open_c open_e, but not tristate.
2023-03-22 14:28:51 +01:00