codepiet / LogicSim3

LogicSim3 - Digital Circuit Simulator - written in Java
GNU General Public License v3.0
19 stars 13 forks source link

Simulation System Slow #1

Closed codepiet closed 4 years ago

codepiet commented 4 years ago

The simulation system is relatively slow. A clock can run at about 20Hz. That can be enough but your pc can do more. At this moment all gates are requested to recalculate their outputs which is not efficient. It would be better to invent a level change notification system. All parts of the circuit - including modules, pins and wires. Parts can register to listen to ‚child‘-parts e.g. a pin can register a few wires and vice versa. Then a part can fire a level change. Then a output can be recalculated...