innovation-plantation / jsimugate

⏚ Simulate standard logic and more. ☕ Improved Java version. Download 📥 https://github.com/innovation-plantation/jsimugate/raw/master/jsimugate.jar 📥 Read more: 👓 https://github.com/innovation-plantation/jsimugate/wiki 👓 Have fun! ⚽
http://www2.hawaii.edu/~tvs
8 stars 0 forks source link

Cycle detection for diodes #8

Open innovation-plantation opened 4 years ago

innovation-plantation commented 4 years ago

When a diode is added, check to see if it is in a directed cycle. If so, all nodes connecting all diodes in that cycle should be combined as a single node instead of going through the diodes.

In practice, none of the classical circuits built have these cycles, but in theory, students might connect diodes to form a cycle, which in simulation creates an unrealistic memory effect using diodes alone, and that behavior might be misleading.

innovation-plantation commented 4 years ago

When removing a diode, also check to see if a cycle is being broken. If so, split the node into separate nodes in the netlist.

innovation-plantation commented 4 years ago

This analysis would need to be done any time a wire is added that connects two nets, where each net has a diode on it. It also needs to be done whenever polarity is reversed on a diode. I It also needs to be done any time a wire is removed if it was connecting a diode on each side. Is it worth all the computation? or will it make editing sluggish?