ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

Debugging Tool #70

Closed thecharlesjenkins closed 2 years ago

thecharlesjenkins commented 2 years ago

A debugging component that stops the clock when the input value matches the configured value.

In the image, the component BP is set to 32 so when the bus value becomes 32, the clock is stopped.

image

I also updated the README to promote the use of Java 14 since that is what the gradle configuration appears to use.

ausbin commented 2 years ago

God bless you for removing the last of the multi-release jar business (in the readme), my apologies for that

ra4king commented 2 years ago

Thanks for the contribution! I left some comments.

thecharlesjenkins commented 2 years ago

Sorry for my ignorance, where can I see the comments?

ra4king commented 2 years ago

The comments are posted in this stream above my last comment. I'm not sure why they're not showing inline in the file changes tab.

Edit: Looks like I had to submit my review after making the comments. Sigh...

ra4king commented 2 years ago

Ok I just got the chance to test this locally. It works really well, thanks! One design question: right now this only stops the clock when any port value changes. If you restart the clock while the value hasn't changed, it won't stop the clock (this is fine and to be expected). However, this also means that if the value stays the same but the enable input changes value to 1, then it will stop the clock then too. I think this should only stop the clock when the value input changes, not when the enable changes.

thecharlesjenkins commented 2 years ago

I think this should only stop the clock when the value input changes, not when the enable changes.

That is a good point. I updated the Breakpoint.java file to only stop the clock if valueChanged is triggered by the data port (and not the enable port).

ra4king commented 2 years ago

Thanks!!