hneemann / Digital

A digital logic designer and circuit simulator.
GNU General Public License v3.0
4.29k stars 436 forks source link

Chronogram displays contents of multiwire #170

Closed josepll closed 6 years ago

josepll commented 6 years ago

Right now the measurement graph shows the level of multiwire signals. That is ok if only a handful of levels are possible. However for big buses (e.g. 32 bits) its much better to show contents and content changes. See example below.

scope

hneemann commented 6 years ago

@josepll Please try the latest pre release build

josepll commented 6 years ago

Better, but it still is a bit confusing with high values. See for instance what happens when increasing a 8 bits register (PC) by 4 every clock cycle image Changes are only shown every 2 cycles because levels don't change (visually) even though they are increased by 4. For higher values (32 bit register) it's even worse. image In last pic register was still increasing by 4 every clock cycle. Notice that levels are not very useful here.

hneemann commented 6 years ago

@josepll Please try again!

josepll commented 6 years ago

Now works great for small values (up to 8/12 bit)

However there are still issues when displaying big values (16/32 bit). See what happens when increasing register by 512. image 0x400 gets displaced and 0x600 is missing The issue appears because the visualization window gets clogged with big values that require extra space. I think the issue just requires extra zoom-in. See what happens with a bit of zoom-out image I think will be enough to allow extra zoom so that the user can visualize what he needs.

hneemann commented 6 years ago

@josepll Now it's possible to zoom into the measurement graph.

josepll commented 6 years ago

Excellent. Now 32 bit values are shown with no issue. Probably 64 bit values fit too. Thanks a lot.

hneemann commented 6 years ago

@josepll It was annoying to me that the names of the signals were not always visible. :-) So I decided to reimplement the scaling and moving behavior of the data in the measurement graph. If you have some time, please try the latest pre-release and let me know what you think about it.

josepll commented 6 years ago

Only problem is that once you zoom-in the window remains in a fixed possition instead of advancing with the simulation. However if you remain at the default zoom the sliding window advances with the simulation as expectes, showing latest changes.

With default zoom (notice slider on the right) imagen

With a bit of zoom at start (notice slider remains where it was before zooming in) imagen

Same thing happens if you zoom out.

hneemann commented 6 years ago

This behavior is intended: If you manually change the scale or position, automatic scrolling is disabled. Maybe I should enable it again if the slider is moved all the way to the right. Hmm.

josepll commented 6 years ago

So far works well. However for complex designs/chronogrmas it gets a bit confussing. A proper chronogram is more intuitive. chronogram.pdf

hneemann commented 6 years ago

@josepll

However for complex designs/chronogrmas it gets a bit confussing. A proper chronogram is more intuitive.

What is missing for a proper chronogram? :-)

josepll commented 6 years ago

That values don't jump up and down, that is very confusing and difficult to follow for big chronograms. Maybe the solution is to have the OPTION to show multiwire signals as levels or as bus contents See the difference below: Digital: image tkgate: image gtkwave: image

For debugging complex circuits I prefer the later ones.