News for hackers. Stuff that matters.
Re:Show HN: CircuitVerse – Online Digital Circuit Simulator by compumike on Thursday June 07, 2018 @12:38AM (#17253339)
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/

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.)

There are no comments on this comment yet.