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

Negative SInt values show up as Xs in VCD output, other discrepancies between firrtl and verilator VCD traces #109

Closed
rimasaviz opened this issue Feb 4, 2018 · 2 comments
Assignees

Comments

@rimasaviz
Copy link

Negative valued SInts are not handled properly when generating VCD traces - they show up as Xs. Looking at VCD.scala (the Change case class), it appears that negative values associated with a wire are always interpreted as uninitialized values.

I've attached a screenshot showing VCD traces produced by firrtl (top) and Verilator when running the same test. SInts that have the MSB set (in the Verilator output) show up as X's in the firrtl output. Also, notice that the timing of the reset and io_din_valid signals are different... this would have caused the firrtl version of the test to fail if it weren't for the "init" signal which initializes the DUT to a known state... not cool!
screen shot 2018-02-03 at 4 31 49 pm

@chick
Copy link
Contributor

chick commented Feb 5, 2018

This seems to be two different issues. The negative number is clearly wrong, I'm amazed we've gone this long without this coming up. The interpreter does not do x propagation, it only has a limited concept of uninitialized. This display issue should be easy to fix.

I have created a separate Issue #118 for figuring out the reset issue. I'm not as sure how easy it is to fix, (mostly it is more likely to break other things than fixing the display issue).

chick added a commit that referenced this issue Feb 26, 2018
Now shows them in binary with MSB set
Fixes part of interpreter issue #109
@chick
Copy link
Contributor

chick commented Jun 29, 2019

Was fixed in PR #118

@chick chick closed this as completed Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants