Repository navigation
Conversation
…estamp Binary VCD vector values shorter than the declared width must be left-extended (IEEE 1364 §18.2). parse_input_vcd mapped the compact payload from the MSB, so b1 on a 28-bit input was read as 0x8000000. The replay parser also dropped the final settled timestamp and could assign a later input change to an earlier output sample. Expand values to their declared widths, settle each timestamp before accepting later inputs, update the CLI call site, and add regression tests for the numeric value, the final timestamp and grouped input ordering.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
parse_input_vcdmisreads compact binary VCD vector values and drops the final timestamp.match_vcd_inputsmaps position 0 to the declared MSB. Sob1on a 28-bit input was read as0x8000000instead of0x0000001. Bits not covered by a short value also kept their previously driven values.#15, is omitted and the last reported timestamp is 5. A later input change could also be assigned to an earlier output sample.The GPU path and the internal CPU check share this parser, so they agree with each other while both being wrong. This showed up when we compared against an independent RTL simulator.
Fix
Tests
New regression tests use the real
NetlistDB/AIG/match_vcd_inputs/parse_input_vcdpath, with no partitioner or GPU, and an inline 28-bit fixture:compact_payload_keeps_numeric_value:b1on[27:0]must equal 1.final_clock_edge_has_output_timestamp: the edge at#15is present.replay_groups_do_not_advance_combinational_inputs: grouped input ordering.Both bugs reproduce at
de0be04. With this change,cargo test --libpasses 350/350 on macOS arm64.