Commit Graph

829 Commits

Author SHA1 Message Date
Giles Atkinson 41c61604c5 Handle SIGTTIN and SIGTTOU on Unix-like OSs with X11 graphics.
That makes it possible to push ngspice into the background while
plot windows are open: the windows remain responsive.
Discussion on ngspice-users, starting 2023-09-01,
title: "`quit` in Interactive Mode."
Also restore terminal state when forcing exit with SIGINT (control-C).
2023-09-23 17:03:24 +02:00
Brian Taylor 492bb64d92 By default, use the shortest typical delay estimate. This makes the digi_74LS90_74LS42.cir testcase for bug641 behave almost the same as MicroCap 12. In ngspice and MicroCap, the only signal with a glitch is not_y8. The other not_* signals look the same. Setting ps_use_mntymx in .spiceinit will change the delay estimates. See the function set_u_devices_info in src/frontend/udevices.c for the various settings of ps_use_mntymx. 2023-09-09 23:22:06 +02:00
Holger Vogt d5ceced24d We are developing towards ngspice-42 2023-08-19 23:54:36 +02:00
Pascal Kuthe 499634df47 integrate OSDI with KLU 2023-08-16 11:14:25 +02:00
Francesco Lannutti 13e74751cc Fixed a MLK for XSPICE and commented out an unused array 2023-08-16 11:14:24 +02:00
Francesco Lannutti b08eb2266a Added initial KLU support for node collapsing 2023-08-16 11:14:24 +02:00
Francesco Lannutti 3c15993fe5 Fixed the case when DiagGmin has to not be loaded again and the case when refactoring returns 1 2023-08-16 11:14:21 +02:00
Francesco Lannutti fe89da2b2c Getting rid of SPARSE for Initial Circuit Matrix creation. Now KLU is totally independent from SPARSE. This opens up the interface for other solvers as well
SPARSE can still used through '.options sparse', but it isn't possible to switch from KLU to SPARSE and viceversa at run-time
2023-08-16 11:14:18 +02:00
Francesco Lannutti 49f6444957 Added "klu_memgrow_factor" option to control the KLU memory grow factor 2023-08-16 11:14:18 +02:00
Francesco Lannutti 8a8adfe451 First KLU support of CIDER TWOD simulations 2023-08-16 11:14:17 +02:00
Francesco Lannutti 11fb209ee6 First KLU support of CIDER ONED simulations 2023-08-16 11:14:16 +02:00
Francesco Lannutti 4c351f51bd Moved the KLU binding structures to be property of the XSPICE connections, instead of XSPICE instances 2023-08-16 11:14:16 +02:00
Francesco Lannutti 534394c0bb First attempt of KLU support for XSPICE 2023-08-16 11:14:16 +02:00
Francesco Lannutti a5885f0e95 Compacted the flag for KLU matrix being Real or Complex to one single bit 2023-08-16 11:14:15 +02:00
Francesco Lannutti 463e2db25a Fixed Sensibility Analysis for KLU - First Trial 2023-08-16 11:14:13 +02:00
Francesco Lannutti e77879ae50 Implement klu_z_print() 2023-08-16 11:14:13 +02:00
Francesco Lannutti 0afda7f89c Implement spMatrix_CSC_dump() 2023-08-16 11:14:13 +02:00
Francesco Lannutti 4d37c32a14 Implemented spDeterminant_KLU 2023-08-16 11:14:12 +02:00
Francesco Lannutti 4489f2b0b2 klu_extract_Udiag, Fixed the PZ Analysis for KLU - Added a missing KLU node in VSRC which exists only in case of PZ Analysis - Other fixes 2023-08-16 11:14:12 +02:00
Francesco Lannutti f25b22e56a Fixed a bug in SMPpreOrder and let KLU digest an empty matrix 2023-08-16 11:14:12 +02:00
Francesco Lannutti ce18d6846f KLU Integration from scratch #4, changed files 2023-08-16 11:14:10 +02:00
Francesco Lannutti cf5991ae81 KLU Integration from scratch #1, new files 2023-08-16 11:14:10 +02:00
Francesco Lannutti 60b4c3cda7 move include files to src/include/ngspice/ 2023-08-16 11:14:10 +02:00
holger 57c880b6a3 Prepare ngspice-41 2023-08-13 14:03:34 +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
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
Holger Vogt 18911b06b6 re-enable rcheck debug output with WINGUI 2023-07-31 14:27:35 +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
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 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
Pascal Kuthe e5d1885e39 make accessible 2023-05-27 10:47:11 +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 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 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
Giles Atkinson 240a2b9406 Add missed file inertial.h. 2023-03-22 14:28:23 +01:00
Giles Atkinson 2643e3b17f New code-model library functions cm_schedule_output() and cm_getvar().
To be used in the inertial delay code for digital code models.
2023-03-22 14:27:35 +01:00
Giles Atkinson c1659a64c3 Change output event setup in evtload.c so that, when making an event call
to a code model, there is no longer a reference to the value of the event
at the head of the free list.  That allows all such free lists (with the
same data type) to be combined, probably improving performance.
This is in preparation for full implementation of inertial delay for
digital nodes.
2023-03-22 14:27:19 +01:00
Holger Vogt 71571a1432 Add function atanh to .control section 2023-03-18 22:31:48 +01:00
Holger Vogt d4ee9af2e6 We are developing towards ngspice-40 2023-03-18 14:34:27 +01:00
Holger Vogt 5cb5d218c9 Remove the obsolete RETSIGTYPE, replace by void 2023-03-18 14:30:29 +01:00
Brian Taylor 56d0c72924 Add port directions when logicexp or pindly are present. 2023-02-01 17:39:37 +01:00
holger b3676bb763 enable make dist 2023-01-30 13:09:15 +01:00
Holger Vogt 167c708e69 Add searchpath for *.osdi relative to ngspice executable 2023-01-27 16:10:28 +01:00
Holger Vogt 71002aa42f Prepare for ngspice-39 2023-01-24 15:49:42 +01:00
Pascal Kuthe 5791a2d449 ensure config.h is always included in cktdefs.h to ensure correct
type signature
2022-12-27 14:10:16 +01:00
Pascal Kuthe acfaf023b3 prototype for Verilog-A integration using OSDI and OpenVAF
This initial prototype is capable of performing DC, transient and AC
analysis. Not all features of OSDI are supported yet and there are still
some open questions regarding ngspice integration. However many usecase
already work very well and a large amount of CMC models are supported.
The biggest missing feature right now is noise analysis.

test: test case for diode DC working with SH

test: add transient analysis to osdi_diode test

test: added docu text to osdi_diode test

test: added test case directories

fix: bug in osdi_load

test: small change to netlist

fix: implement DEVunsetup

fix: correct behaviour for MODEINITSMSIG

test: osdi diode enable all analysis modes

removed netlist

ignoring test results

added the build of the diode shared object to the python test script

deleting old stuff and always rebuilding the shared object

added diode_va.c to the repo

preparing CI

Create .gitlab-ci.yml file

(testing) add res, cap and multiple devices test

feat: use osdi command to load files

Previously OSDI shared object files were loaded from fixed directories.
This was unreliable, inconvenient and caused conflicts with XSPICE.

This commit remove the old loading mechanism and instead introduces the
`osdi` command that can load (a list of) osdi object files (like the
codemodel command for XSPICE). A typical usecase will use this as a
precommand in the netlist:

.control
pre_osdi foo.osdi
.endc

If the specified file is a relative path it is first resolved relative
to the parent directory of the netlist. If the osdi command is invoked
from the interactive prompt the file is resolved relative to the current
working directory instead.

This commit also moves osdi from the devices folder to the root src
folder like xspice. This better reflects the role of the code as users
may otherthwise (mistakenly) assume that osdi is just another
handwritten model.

test: update tests to new command

fix: do not ignore first parameter

feat: implement log message callback

fix: don't generate ddt matrix/rhs in DC sweep

fix: missing linker script

update to osdi 0.3

(testing) simplify test cases, fix bug

(testing) multiple devices test improvement

(testig) node collapsing bugfix

test: increase tolerance in tests

feat: update to newest OSDI header

fix: temperature update dt behaviour

fix: ignored models

fix: compilation script

fix: allow hicum/l2 to compile with older c++ compilers

fix: set required compiler flags for osdi

fix: disable x by default

fix: add missing SPICE functions

fix: update diode to latest ngspice version

feat: implement python CMC test runner

doc: Add README_OSDI.md

fix: make testing script work with python version before 3.9

fix: free of undefined local variable

fix: do not calculate time derivative during tran op

update osdi version

fixes for compilation on windows
2022-12-27 13:51:57 +01:00
Holger Vogt 6c1be283a7 Add a function ddt (derivative versus time) to the B-source funtion parser. 2022-12-11 15:38:22 +01:00
Brian Taylor 7ff8f3773f Handle cases where logicexp has a timing model but no pindly. This is rare, only 22 tests from the digital libraries. Move digital examples, add missing .spiceint file. 2022-12-11 15:34:33 +01:00