Commit Graph

483 Commits

Author SHA1 Message Date
Holger Vogt 7130097710 Prevent crash when no simulation has been run and
asking for plotting an event node
2022-02-19 17:23:36 +01:00
Giles Atkinson 16f586b65e Respect the "tstart" parameter when saving event node data (XSPICE).
Fixes Support Request #47: "XSpice memory usage (TRAN TSTART effect)".
2022-01-28 12:25:36 +01:00
Brian Taylor 08bc3ccdd6 Remove compiler warnings (writ_ifs.c ipcsockets.c). 2022-01-13 14:54:16 +01:00
Holger Vogt f0e9a35eb6 Add 'esave' command to save only specific event nodes.
Add a prompt for esave/eprint/eprvcd.
2022-01-09 10:58:38 +01:00
Holger Vogt 9308c6b077 Reuse memory for queued events.
Patch #109 - 2 provided by Giles Atkinson
2022-01-03 22:11:03 +01:00
Holger Vogt 8263e2a4da The AD and DA hybrid XSPICE bridges consume a lot of
memory (one state per time step added). Memory of
previous time steps is not recovered.

Patch #109 by Giles Atkinson reduces memory consumption
dramatically (> factor of 10).
2022-01-01 16:14:48 +01:00
Holger Vogt 9be9f46f96 Remove unused function Evt_Data_destroy() 2021-12-16 08:04:44 +01:00
Holger Vogt 2f98a5b305 evtprint: prevent a crash when eprint has been called
but there is no simulation run.
2021-12-13 21:44:02 +01:00
Holger Vogt 6b41ad433a Remove memory leak
Free some tokens generated by CNVget_token
Initialize reset and clk

Still missing: free 'states'
2021-12-13 21:32:15 +01:00
Holger Vogt 36fa47a8a0 Remove memory leak
Add callback function free_local_data
Free some tokens generated by CNVget_token
2021-12-13 21:31:49 +01:00
Holger Vogt c895ca33f7 Pswitch: Fix a bug in resistance calculation when cntl_on < cntl_off
Correct setting of parens
2021-10-29 16:35:47 +02:00
Holger Vogt eee639d98d Rename the capacitor and inductor code models to capacitoric and inductoric
8e4db9109 ("adms bsimbulk and bsimcmg implementation based on work from Robert Larice", 2020-12-17)
changed inptypelk.c, line 37 from strcmp to strcasecmp.
Thus Capacitor (model for C) and code model capacitor are no longer
distinguished. Model parsing for the code models fails.

These code models are used very infrequently, thus renaming them
is a valid fix.
2021-10-29 16:28:25 +02:00
Holger Vogt 4ce4f52938 XSPICE d_source: prevent a crash when the input file is not found 2021-09-29 20:30:10 +02:00
Holger Vogt d4c559421e prevent crash if info.node_table has not been defined,
caused by some preceding error.
2021-09-29 20:29:54 +02:00
Holger Vogt 6aac403ab0 XSPICE delay: add some more safeguards 2021-08-03 15:53:42 +02:00
Holger Vogt 028dd0ab88 Remove unused
Add a delay of half a time step to reduce error
2021-07-05 14:24:46 +02:00
Holger Vogt abc6eb56f3 Plausibility checking
Enforce out=in when delay == 0
2021-07-05 14:24:29 +02:00
Holger Vogt fbab9a0fe2 Add an analog delay source for transient simulation
Internal circular memory of size tstop/tstep or user defined.
(aprox.) every tstep a value is stored.
Delay time in multiples of tstep, by control voltage or user defined.
Dc or ac sim will simply connect input to output.
2021-07-05 14:24:06 +02:00
Holger Vogt 93f6a50553 New author 2021-07-05 14:20:14 +02:00
Holger Vogt 22a516bc4d New author 2021-07-05 14:19:56 +02:00
Holger Vogt d36fcaf34c Neew pswitch with patch 0001-pswitch-fix.patch from Jube 3rd, 21 at
https://sourceforge.net/p/ngspice/discussion/127605/thread/d55d2322f2/#c966/b802/4764/2540/3b3f/04a4/bc51/3a68

Input resistance, numerically computed derivatives with auto-partial, reasonable limits.
2021-07-05 14:19:43 +02:00
Holger Vogt f12592871a Set derivative d out/d contrl to 0 if outside of switching range.
Disable auto derivatives.
Enable algorithmic derivatives.
2021-07-05 14:18:08 +02:00
Holger Vogt 6d9876229c Fixes bug #331
Bug detected and analysed by Arsen Liash
Patch provided by Yurii Demchyna
2021-07-05 14:16:35 +02:00
Holger Vogt 19ddeb8fe6 formatting (not complete) 2021-07-02 11:54:59 +02:00
Holger Vogt 545d2f9177 Report an error when trying to define ports
'v', 'vd', 'i', and 'id' as 'inout'
Parch 105 provided by  Giles Atkinson
2021-07-02 11:54:34 +02:00
Holger Vogt d7feec20fe enable parameter 'gain'
patch provided by  Bohdan Tkhir
2021-02-21 16:48:28 +01:00
Holger Vogt d45e95aa4c We no longer want to install cmpp or other XSPICE files.
The manual describes making code models from inside
the ngspice build process, and that's what we support
right now.
2021-01-23 12:43:51 +01:00
Holger Vogt a5eac333bb Revert "When installing ngspice, do not install the headers"
This reverts commit 5a0d213fec.
2021-01-22 16:05:14 +01:00
Holger Vogt 176023f470 Remove compiler warnings 2021-01-03 14:28:22 +01:00
Holger Vogt 3c354092ff Line endings from \r\n to \n 2021-01-02 19:06:58 +01:00
Holger Vogt 5a0d213fec When installing ngspice, do not install the headers
(all *.h), nor install dlmain.c and cmpp. Nearly all
users are not interested in creating code models, it is
not documated, and a much better way to create (and test)
code models is from within the ngspice sources (as is
documented in the manual).
2020-12-22 17:56:18 +01:00
Holger Vogt 68e14ad519 cross compile: -lshlwapi not hard-coded,
but via $(cmpp_LDADD)
Patch suggested by Érico Rolim
2020-12-22 17:56:18 +01:00
Holger Vogt 5c4af54be1 Windows.h -> windows.h 2020-12-22 17:56:18 +01:00
Holger Vogt 92c6ff26f5 add a flag 'LIMIT' to pwl code model. If set true,
the output is kept constant at y[0] when x is less then
x[0], or at y[xmax] when x > xmax.
Default is FALSE, then the output beyond the x bounds is
extrapolated linearly, as usual up to now.
2020-12-22 11:11:03 +01:00
Holger Vogt a95700799d install the callback function 2020-10-16 18:15:05 +02:00
dwarning 75228612c0 few fixes for prototypes 2020-10-15 18:25:25 +02:00
Holger Vogt 4d062ecc92 fix a bug in the derivative 2020-10-10 13:54:39 +02:00
Holger Vogt 1f6c4d6338 Add a new code model pswitch, behaviour directly compatible
to PSPICE (rounded corner at cntl_on)
2020-10-10 13:53:47 +02:00
Holger Vogt fdc143ce16 Add a limit capability to the code model aswitch
Example switch-oscillators_inc.cir showed currents up to 3GA
2020-10-10 13:53:36 +02:00
dwarning 5f7f54d961 cleaning prototypes 2020-10-10 12:30:40 +02:00
dwarning 5d999be998 rm redundant redeclaration 2020-10-10 12:30:22 +02:00
Holger Vogt a3380903be Fix a bug in the comment of the file headers 2020-10-10 12:22:43 +02:00
Holger Vogt 1bcfe886f3 GPL instead of BSD 2020-10-10 12:22:27 +02:00
Holger Vogt 468769df16 Update on various licences for XSPICE code models 2020-10-10 12:22:12 +02:00
Holger Vogt 2335639848 License 3-clause BSD
Update to license information
2020-10-10 12:22:01 +02:00
Holger Vogt df0ffcfc2b XSPICE is Public Domain
Update to license info
2020-10-10 12:21:35 +02:00
Holger Vogt cc5369816b XSPICE is in the public domain.
Update to the license information.
2020-10-10 12:21:22 +02:00
Holger Vogt 617ed01a5b licensi info:
Public Domain

Georgia Tech Research Corporation
Atlanta, Georgia 30332
PROJECT A-8503
2020-10-10 12:21:10 +02:00
Carsten Schoenert 5a0ed18907 Small fixup for misspelled words 2020-08-20 15:22:48 +02:00
Holger Vogt 8051a3c351 remove calling MIFdestroy() that is empty 2020-08-20 15:19:49 +02:00