Commit Graph

8440 Commits

Author SHA1 Message Date
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 79e4b78a78 Prepare ngspice-41 2023-08-11 14:39:56 +02:00
Holger Vogt 6600bf18b4 Prepare ngspice-41 2023-08-11 14:12:50 +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
Holger Vogt f60766a1fa Transformer examples, (three different methods)
Single primary and secondary windings

More to come (multiple ports, core saturation)
2023-08-11 11:38:52 +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
dwarning 4f22726c87 better low Ic range covering 2023-08-11 11:38:09 +02:00
Holger Vogt 2065dee82c Fix comment on old-style .lib 2023-08-11 11:37:49 +02:00
dwarning 5704790cc2 no need for extra run 2023-08-11 11:37:37 +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
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 79c46b0c44 'current time' instead of 'actual time' 2023-07-31 14:30:45 +02:00
Holger Vogt 8bd3c87be1 better visibility 2023-07-31 14:30:37 +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 5fe236290f Add example of reading S-parameters from a Touchstone file. 2023-07-31 14:30:02 +02:00
Giles Atkinson f632da5f7f Add a comment to say that LT/PSPICE compatability is needed. 2023-07-31 14:29:50 +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
Brian Taylor 68f1015075 Example for 7490a Pspice subckt. This exercises jkff, logicexp, and pindly conversions to XSPICE. 2023-07-31 14:27:59 +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
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