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

Malformed 'b' signal data can be generated #15

Closed
ghost opened this issue Feb 2, 2022 · 2 comments
Closed

Malformed 'b' signal data can be generated #15

ghost opened this issue Feb 2, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 2, 2022

Hello! Thanks for making this awesome lib! I have an application which generates an malformed vcd using the interface, which I found surprising.

sbasu@ubuntu:~/Devel/rust-hdl2/rust-hdl/rust-hdl$ gtkwave ./i2c_driver.vcd 

GTKWave Analyzer v3.3.86 (w)1999-2017 BSI

[0] start time.
[100000000] end time.
GTKWAVE | malformed 'b' signal data for 'uut.driver.scl' after time_idx = 1

Here is an example of line in the .vcd file that I think causes the problem:

bz "

I suspect that the problem is that I am writing a single (scalar) value to a vector. I can probably fix this in the application, but if you are interested, I can submit a PR to handle it in the library as well.

@kevinmehall
Copy link
Owner

You probably want to use change_scalar instead of change_vector. The Writer doesn't keep track of the types of the variables you create. I'm not sure there's anything inherently wrong with a vector of width 1 according to the VCD spec, though.

@ghost
Copy link
Author

ghost commented Feb 3, 2022

Yeah - I changed the app to use change_scalar instead. I'm not sure why a scalar vector doesn't work. It seems particular for the use of tri-state logic though.

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

1 participant