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

convert Vcd to json file #14

Open
abdulwajid10 opened this issue Jun 28, 2021 · 6 comments
Open

convert Vcd to json file #14

abdulwajid10 opened this issue Jun 28, 2021 · 6 comments

Comments

@abdulwajid10
Copy link

Hi, can you please elaborate or provide any solution that how you converted VCD file to json file format? Means if i have a VCD format file how will i convert it according to your JSON format? Thanks

@Nic30
Copy link
Owner

Nic30 commented Jun 28, 2021

Hello,

https://github.com/Nic30/pyDigitalWaveTools/blob/master/tests/vcdParser_test.py#L42

Try if it works for you, I can eventually prepare some examples if required, currently I do not remember if the json format is exactly same but the differences should be minimal if there are any.

@abdulwajid10
Copy link
Author

Thank you for responding. Is there any possibility if you can add option to accept VCD files and convert them to Json and then show waveform instead of directly accepting json file format?

@Nic30
Copy link
Owner

Nic30 commented Jun 29, 2021

I can not utilize directly pyDigitalWaveTools because it is a Python. But there are several vcd parsers in JS, eg. https://github.com/wavedrom/vcd https://github.com/ahmed-agiza/vcd-parser and many others.

Do you think you can look at the existing libraries and try them a little bit and find out which one is the best?
Or at least collect some practical info?
I can make an integration, but I do not have time to look at all the libraries.

@abdulwajid10
Copy link
Author

Sure I will check some libraries and then let you know

@abdulwajid10
Copy link
Author

abdulwajid10 commented Jun 29, 2021

waveFile.txt
I have tried this library. https://github.com/ahmed-agiza/vcd-parser
I passed VCD file and it converted it into json format. but when i passed that json file to your d3-wave project it is not generating wave file, because of format difference in JSON file.
Can you just try it and check the Json format output it is generating and how can i change it according to Json format used in your project.
I have also attached the VCD file code im trying to run on d3-wave.

@Nic30
Copy link
Owner

Nic30 commented Mar 23, 2023

Implementation currently resides in https://github.com/Nic30/vscode-extension-digitalcircuitanalysis/blob/main/src/media/vcdParser.ts I will move it to this or independent soon.

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