Support digital, event based and mixed-signal (analog/digital) simulation using ngspice
For simulating analog amd digital circuits, ngspice has two basic simulation modes: The analog mode, whose transient simulation deliveres voltage/current versus time with high precision, but simulation may take some time. The digital, event based mode, which is much faster (>50x), delivering high and low signals and timing delays, but lacks the analog precision.
The latter is not yet supported by the Eeschema simulation GUI. Already now circuits may be created, analog and digital device models may be assigned, and analog, digital and mixed signal simulations be run. However, the digital data are not available for evaluation, e.g. for plotting.
For inputting digital data, sometimes an approach supporting vectors is required. This has been requested in #11616 (closed) already. ngspice-38 supports automatic bridging between analog and digital nodes.
For evaluating data, the plotting capability has to be extended, e.g. by a stacked display of several nodes for digital data (best in addition to analog data for mixed signal) versus time. The shared ngspice API already offers access to these data.
KiCad Version
Application: KiCad Schematic Editor
Version: (6.0.9-0), release build
Libraries:
wxWidgets 3.1.5
libcurl/7.64.1 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.41.0
Platform: macOS Big Sur Version 11.6.8 (Build 20G730), 64 bit, Little endian, wxMac
Build Info:
Date: Oct 29 2022 19:31:49
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.80.0
OCC: 7.6.3
Curl: 7.64.1
ngspice: 37
Compiler: Clang 12.0.0 with C++ ABI 1002
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON