Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request #16

Open
raulbehl opened this issue Nov 22, 2022 · 5 comments
Open

Feature Request #16

raulbehl opened this issue Nov 22, 2022 · 5 comments

Comments

@raulbehl
Copy link

Hey @Nic30,

I am a hardware engineer and loved your work. I constantly use for debugging test fails. I want to integrate this as part of my React JS project and have some feature requests which would really help the way I use this for debugging fails:

  • The vertical bar on the waveform should only be rendered when clicked. It’d be nice if it snap to the point where the signal value changes whenever user clicks close to it. We usually want to check what cause the signal to change on the active edge of the clock

  • Show signal values along with signal names as seen in the picture below

Screenshot 2022-11-22 at 16 59 36

PS: I’m beginning to learn react and wanted to render the wavegraph in the space marked as waveform below:

Screenshot 2022-11-22 at 17 06 16

I tried coding it as:

import { WaveGraph } from 'd3-wave.git';

<script type="text/javascript">
  var svg = d3.select("#wave-graph");
  var waveGraph = new WaveGraph(svg);
  waveGraph.setSizes();
  waveGraph.bindData(JSON.parse(contents));
</script>

But it didn’t work. Any ideas on what would be the best to render wavegraph inside a react js project?

@Nic30
Copy link
Owner

Nic30 commented Nov 24, 2022

Good idea, I think that vertical bar should be configurable using some configuration property.

I tried coding it as:

What build tool are you using webpack, gradle,...? Can you provide the config and package.json?
I do have some vscode extension which is using webpack and everything seems to work. I need to make it public but before that I need to finish vcd support for this library.

Main problem is that I do not have experience with publishing of typescript packages (I need to set CI to publis also typescript @types package).

@raulbehl
Copy link
Author

raulbehl commented Nov 24, 2022

Thank you for the reply, @Nic30.

I think that vertical bar should be configurable using some configuration property.

That'd work as long as we have a mode where it shows up at the place where the waveform is clicked. I'd really like it to be rendered whenever the waveform is clicked rather than having it follow the mouse pointer on the waveform.

What build tool are you using webpack, gradle,...? Can you provide the config and package.json?

I am using maven to manage dependencies and was able to include d3-wave as one of the dependencies in the pom.xml file. Will share the package.json soon.

...but before that I need to finish vcd support for this library.

Adding vcd support would be great. I was able to use your vcd2json python tool to get the vcd to be converted into json.

@Nic30
Copy link
Owner

Nic30 commented Nov 24, 2022

rendered whenever the waveform is clicked

Yes, as in the GTKWave.

pom.xml file.

If d3-wave was downloaded and installed correctly it must be the problem of transpiler settings. If you can provide some project where I can try it would be great.

@raulbehl
Copy link
Author

raulbehl commented Dec 7, 2022

If you can provide some project where I can try it would be great.

I've tried adding d3-wave to a simple react app created using create-react-app. You can download and test it from here: https://github.com/raulbehl/d3-wave-trial

@Nic30
Copy link
Owner

Nic30 commented Mar 23, 2023

In https://github.com/Nic30/vscode-extension-digitalcircuitanalysis I also found out that the zoom and drag is broken if d3-wave is embedded but the installation and compilation seems to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants