sharpie7 / circuitjs1

Electronic Circuit Simulator in the Browser
GNU General Public License v2.0
2.23k stars 622 forks source link

Copy of custom logic do not work #837

Closed hjanetzek closed 1 year ago

hjanetzek commented 1 year ago

In this circuit only the first (rightmost) custom logic instance is evaluated correctly. The copies don't work, not even when creating a new instance and copying the model configuration.

custom-logic-bug.zip

Awesome work btw! this program really helps me getting started with electronics (:

pfalstad commented 1 year ago

Hi, you have two many question marks in the first line of the model. You have "??????????1" which is 10 question marks. There are 10 inputs, so the 1 matches the first output (0). So as soon as output 0 becomes high, then the outputs go into a high-impedance state and stay there no matter what the inputs are.

Also the rightmost custom logic instance has a slightly different model where the outputs are all 0, not _. So it doesn't have that problem.

hjanetzek commented 1 year ago

Oh thank you! :)