inda19plusplus / logik

Logisim clone
MIT License
2 stars 5 forks source link

Make the simulation respond to edits correctly #46

Closed NogginBops closed 4 years ago

NogginBops commented 4 years ago

We want the simulation to be responding to the inputs of the user but we might not want to step the simulation (i.e. we don't want clocks to flip in the middle of editing).

The way to make this work I think is that when edits to a subnet gets done that subnet is marked as dirty, then the back-end starts resolving this subnet and propagates this change until there are no dirty subnets left. We would have to think about if there is any case where changes could propagate forever, though I don't think that is actually possible (and that problem would also exist in the normal simulation in that case).

This way the logic gets updated while editing without having to tick the simulation.

default-username-852 commented 4 years ago

Should it be optional to update until there are no dirty subnets or are there no cases where you'd want to place/link a component and not update the subnets that the component is linked to?

NogginBops commented 4 years ago

I don't really have an answer for this. Logisim has an option to do this so I guess it has a use...

default-username-852 commented 4 years ago

This should mostly have been resolved in #47. Closing