mirror of
https://git.code.sf.net/p/ngspice/ngspice
synced 2026-09-01 18:27:19 +02:00
10276f99361ad1e7eda601ff7b22cafed3dffddd
coefficient list) one element at a time, calling askInstanceQuest for
every element. Two bugs made that catastrophic on a large chip:
* IFvalue val was uninitialised, so a query that did not set
v.numValue left `n' as stack garbage -- the element loop then ran
essentially forever.
* askInstanceQuest TMALLOCs the coefficient vector (vsrcask.c) on
every call and printvals()/printvals_old() never freed it, so the
listing leaked O(n^2) allocations -- tens of GB on a deck with many
stimulus sources.
Fix: memset val before the query and clamp n (kills the runaway loop),
and free the returned vector after use via a new free_if_vec() helper.
Verified: pulse coefficients still print correctly; show on MOS/BSIM4/
OSDI/vsource is unchanged and does not crash.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
README for NGSPICE ================== Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and Xspice. Spice3 does not need any introduction, it is the ancestor of many commercial or open source circuit simulators. In over 30 years since its existence it has set several de-facto standards for simulating circuits. Cider couples the Spice3 circuit level simulator to a device simulator to provide greater simulation accuracy of critical devices. So you may create device models for diodes, bipolar, JFet and MOSFETs derived from their cross-sectional structures and materials. Xspice is an extension to Spice3 that provides code modelling support and simulation of digital components through an embedded event driven algorithm. Ngspice is, anyway, much more than the simple sum of the packages above, as many people contributed to the project with their experience, their bug fixes and their improvements. If you are interested, browse the site and discover what ngspice offers and what needs. If you think you can help, join the development team. Ngspice is an ongoing project, growing everyday from users contributions, suggestions and reports. What we will be able to do depends mostly on user interests, contributions and feedback. USER DISCUSSION FORUMS: ----------------------- For discussions on ngspice, there are five discussion forums, to be found at https://sourceforge.net/p/ngspice/discussion/. These typically provide quick answers to any question concerning ngspice. A new section on 'tips and examples' assembles useful tips provided by maintainers and users. MAILING LISTS: ------------- There are two mailing lists dedicated to the use and development of ngspice. * [email protected]: This list is the list for the users of the ngspice simulator. * [email protected]: ngspice development issues. Developers and "want to be" developers should subscribe here. To subscribe the list(s), send a message to: <[email protected]> <[email protected]> WEB SITEs: -------- This project is hosted on Sourceforge.net. The home page is https://ngspice.sourceforge.io The page offering source code, MS Windows executables, and user interaction is https://sourceforge.net/projects/ngspice
Languages
C
93%
AMPL
3.1%
C++
2.1%
Perl
0.4%
Makefile
0.4%
Other
0.7%