Nic30 / vscode-extension-digitalcircuitanalysis

Visual Studio Code extension for debuging of digital circuit design generation process
4 stars 2 forks source link

Mode left-right #6

Open qarlosalberto opened 10 months ago

qarlosalberto commented 10 months ago

In the waveform viewer, how can I move left-right in the time?

Nic30 commented 9 months ago

hold LMB and drag

Nic30 commented 9 months ago

But you need to be zoomed in enough to have some time to move.

qarlosalberto commented 9 months ago

thanks

qarlosalberto commented 9 months ago

I think that it doesn't work correctly. In the example:

imagen

I do zoom:

imagen

And I can move it. But the limit is 3.20 ns, not the final.

imagen

qarlosalberto commented 9 months ago

Other things:

  1. If I do zoom 2 times the left-right movement doesn't work.
  2. Is is possible to delete the question and save icons? (I'm integrating d3-wave in my extension)
  3. Is it possible to add horizontal scroll?

Thanks!!

Nic30 commented 9 months ago

I think that it doesn't work correctly.

You were right. But to be more specific, it does not work if you zoom too much. It also depends on the size of the view area. It looks like a rounding error. For example0.vcd with 600pix width it stops working if zoomed to 1.5ms (out of 4ms in file)

  1. 3.

The definition of zoom behavior is there https://github.com/Nic30/d3-wave/blob/master/src/d3-wave.ts#L84 The behavior can be customized by override of this method. Note that the definition is a "normal" d3.zoom with zoom boundaries specified by

2.

The definition of the icon is there https://github.com/Nic30/d3-wave/blob/master/src/d3-wave.ts#L263 Maybe we should also separate icon tooltip (end of this function) to another function so it is more easy to customize icons.

Nic30 commented 9 months ago

@qarlosalberto

Please try version currently in git it should be fixed https://github.com/Nic30/d3-wave/commit/87d6dd229e0cbe5d0b19146a448817bf49f5f3d9 Also if you have any other suggestions about what you want to customize, now is the good time to write it as we can easily expose some api before release.

qarlosalberto commented 9 months ago

It works much better, thank you very much!

I have some suggestions:

imagen

imagen

imagen

imagen

I'm testing with this vcd: https://github.com/wavedrom/vcd-samples

qarlosalberto commented 9 months ago

Also it could be nice if I can bind a callback to the click button. I would like to go to the code in the editor when the user click the signal.

qarlosalberto commented 9 months ago

Other improvements is expand the arrays by row and the signals by bits.

Nic30 commented 9 months ago
  1. Hide wave value label if won't fit

https://github.com/Nic30/d3-wave/blob/master/src/rowRenderers/bits.ts#L89 We can check if the text is too large and optionally hide it.

10min

  1. Vertical scrollbar for large signal list

scrollbar implementation is there https://github.com/Nic30/d3-wave/blob/master/src/treeList.ts https://github.com/Nic30/d3-wave/blob/master/src/dragBar.ts

It is hard to say what is wrong just by looking at picture.

4h

  1. Horizontal scroll bar for time domain

https://github.com/Nic30/d3-wave/blob/master/src/waveGraph.ts#L230 Scale for x (time) axis is already there. We need to just add scrollbar as done in many d3.js examples.

20min

  1. Prepare an example for custom icon in menu https://github.com/Nic30/d3-wave/blob/master/src/waveGraph.ts#L258 20min

  2. Expansion of bit vectors and array items

I would put this functionality into context menu of signal label. Currently there is a option which allows user to change format of data https://github.com/Nic30/d3-wave/blob/master/src/signalLabelContextMenu.ts#L26 On this place we can add another item in menu which will spawn child items.

30min


All are easy to do, but please post new feature request as a separate issue so we can easily track progress. Otherwise it is easy to overlook something.

Also if you can help with any of it it would be awesome.

qarlosalberto commented 9 months ago

Perfect, I will create other issues. I will try to help in the devepment.

We can skip "Vertical scrollbar for large signal list". I see that the problem is that the list of signals is very very very large... But it works fine.

qarlosalberto commented 9 months ago

I will do the small features, so I can start looking the code.