3 ms·
It's possible to combine event-driven simulation (for digital) and nonlinear differential equation based simulation (for analog) within the same simulator. The
by compumike 8y ago
It's possible to combine event-driven simulation (for digital) and nonlinear differential equation based simulation (for analog) within the same simulator. The simulation engine can be smart enough to mix the two efficiently. As a toy model, consider this 4-bit counter plus DAC (click "Simulate" at the bottom):
https://www.circuitlab.com/editor/53xa3r/ https://www.circuitlab.com/editor/53xa3r/
The simulation loop is both event driven (when CLK1 flips state every 0.5 seconds), propagating those changes through combinatorial gates, and analog, simulating the op-amp to create a simple digital-to-analog converter (DAC). Bridging the analog and digital sides within the simulator is tricky, but not impossible.
You are correct that if there were not both event-driven and analog simulation intermixed, and we simply simulated all the digital gates with their analog implementations in MOSFETs, that simulation would be at least an order of magnitude slower -- probably far worse!
(Disclosure: I built CircuitLab's simulation engine.)