Skip to content

Conversation

@oscargus
Copy link

@oscargus oscargus commented Jan 3, 2026

Based on the discussion in verilator/verilator#6879

Will have to test a bit more before removing from draft.

@oscargus oscargus force-pushed the string branch 3 times, most recently from 294c7c6 to c9dd989 Compare January 4, 2026 10:39
! ./vcddiff tests/counter.vcd tests/counter.time.no_diff.vcd | grep -q .
! ./vcddiff tests/counter.vcd tests/counter.change_reorder.no_diff.vcd | grep -q .
! ./vcddiff tests/counter.vcd tests/counter.var_reorder.no_diff.vcd | grep -q .
! ./vcddiff tests/counter.vcd tests/counter.identifier.no_diff.vcd | grep -q .
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the file name here (and some more) was different than the actual, so the test passed as the "file not found" error was on stderr... I have renamed the files to correspond to the script.

@oscargus oscargus marked this pull request as ready for review January 4, 2026 10:44
@oscargus
Copy link
Author

oscargus commented Jan 4, 2026

Not sure how much to test, but added tests for changed identifier (which can be handled) and changed value (which provides output). It uses the same printing for string errors as for vector errors, but that is maybe OK?

@oscargus
Copy link
Author

oscargus commented Jan 4, 2026

It should also be noted that spaces in strings must be escaped, typically as \040 and that is not handled here (but shouldn't present a problem to detect changes, just non-ideal output). That was actually the reason I started to look into this as NVC and GHDL handles strings (and VHDL character) differently, so wanted input from SystemVerilog and therefore Verilator, to check which variants are available. Not sure if it is fst2vcd or the simulator that do the replacement, but would guess for fst2vcd since it should be possible to have spaces in fst.

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

Successfully merging this pull request may close these issues.

2 participants