flandreas / antares

Digital circuit learning platform
49 stars 6 forks source link

Not working animation and changes in branches in slow simulation #544

Closed mrk67422 closed 1 year ago

mrk67422 commented 1 year ago

I'm a new user, but I wanted to commend Antares for a very successful project showing great animations and time management during the simulation.

In the created circuits, I noticed that with slow simulations, when the animated bits move in the branches, not everything works properly.

In the circuit attached as an example, during the simulation, the circuit does not react to the change in the value of the inputs. The color and state of the bit change, e.g. from 0 to 1, but it has no further effect in the branch.

A change in the Simulation menu in the Noise submenu helps. When during the simulation we make a change to "Random Noise", then the animations start to react to changes taking place on the inputs. When further in the animation we change the option to "No Noise", the circuit does indeed go into the mode without random delays, but what good animations now work properly.

Maybe I misunderstand the idea of how Antares works, but according to my logic and the current state of knowledge, this behavior of the program is incorrect.

Antares 1 Antares 2 Antares 3

flandreas commented 1 year ago

@mrk67422 Thank you for reporting this.

I think the cause of the problem is that inputs apply a propagation delay if the user clicks on the during simulation. Just like for switches, this delay is 1'000 ns. During this time, the user can still click on inputs, and they will change their state, but no signals are propagated along the wires until the simulation time has reached these 1'000 ns delay.

So I think one solution to the problem could be to disable the inputs as long as they are waiting for the 1'000 ns to pass by. While being disabled, they should draw their state differently, and they shouldn't accept new mouse clicks from the user.

I don't see how this is influenced by the "Simulation -> Noise" setting. Maybe a misconception?