The problem is in XSPICE breakpoints handling and dll mode. When ngspice is built as dll, it delegates CKTtime - CKTdelta operation to the dll client using sharedsync call. Delta that needs to be subtracted is passed as an olddelta argument, and the client must subtract it if there are convergence issues. If the client does not add a callback for this operation, default implementation begins to work and substracts olddelta from CKTtime. The problem is in breakpoints. When an analog breakpoint is between the last accepted timepoint and CKTTime, then ngspice substracts CKTdelta from CKTtime and passes 0 as olddelta to sharedsync. It is ok. The problem is in XSPICE breakpoints. If XSPICE breakpoint is set between the last accepted timepoint and CKTtime, then ngspice substracts CKTdelta but pass non-zero olddelta to sharedsync. As a result, olddelta is subtracted twice, and CKTtime becomes less than the last accepted timepoint, which is incorrect. The solution is to inform sharedsync call that olddelta has already been subtracted from CKTtime during XSPICE breakpoint processing. olddelta can't be set to 0 during XSPICE breakpoint handling because it also takes part in the "timestep too small" check. That is why a new flag has been introduced. It should be reset during each iteration and set to 1 only when there are no convergence issues and there are breakpoints between the last accepted timepoint and CKTtime. If it is set, then DCtran knows that olddelta need to be set to zero. This issue has been fixed for SHARED_MODULE option only. Looks like CLUSTER feature also uses incorrect olddelta, and it has to take into account the XSPICE breakpoints flag. This problem has not been fixed because we can't properly test this case. WARNING: sharedsync is still broken if the library client decides to use a callback for step delta managing and discard a valid delta after the successful integration step. EVTBackup may drop valid points in this case. The rule of thumb: do not set GetSyncData callback in ngSpice_Init_Sync. |
||
|---|---|---|
| examples | ||
| m4 | ||
| man | ||
| src | ||
| tests | ||
| visualc | ||
| .gitattributes | ||
| .gitignore | ||
| ANALYSES | ||
| AUTHORS | ||
| BUGS | ||
| COPYING | ||
| ChangeLog | ||
| DEVICES | ||
| FAQ | ||
| INSTALL | ||
| Makefile.am | ||
| NEWS | ||
| README | ||
| README-old.adms | ||
| README.adms | ||
| README.shared-xspice | ||
| README.tcl | ||
| README.utf8 | ||
| README.vdmos | ||
| Stuarts_Poly_Notes | ||
| autogen.sh | ||
| build-for-mac-os.sh | ||
| compile_linux.sh | ||
| compile_linux_shared.sh | ||
| compile_macos.sh | ||
| compile_min.sh | ||
| compile_min_shared.sh | ||
| configure.ac | ||
| cross-compile-shared.sh | ||
| cross-compile.sh | ||
| ngspice.pc.in | ||
README
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, is the most popular circuit simulator. In over 30 years of its life Spice3 has become a de-facto standard for simulating circuits. Cider couples Spice3f5 circuit level simulator to DSIM device simulator to provide greater simulation accuracy of critical devices. DSIM devices are described in terms of their structures and materials. Xspice is an extension to Spice3C1 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. * ngspice-users@lists.sourceforge.net: This list is the list for the users of the ngspice simulator. * ngspice-devel@lists.sourceforge.net: ngspice development issues. Developers and "want to be" developers should subscribe here. To subscribe the list(s), send a message to: <ngspice-users-subscribe@lists.sourceforge.net> <ngspice-devel-subscribe@lists.sourceforge.net> WEB SITEs: -------- This project is hosted on Sourceforge.net. The home page is http://ngspice.sourceforge.net The page offering source code and user interaction is http://sourceforge.net/projects/ngspice