Waveform testing#267
Merged
Merged
Conversation
switched interpreter to output diagnostics on stderr and base errors + ascii wveform on stdout janky thing to keep monitor on stdout only by specifying the err/out semantics in the test gen
21a5b98 to
a24437b
Compare
ekiwi
approved these changes
Jul 1, 2026
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.
Do not merge until #264
Addressing #253. Most of the diff is the new
runt runt/waveformconfig, the new ASCII output .expect files, and a bunch of shifts in the test because I removed the typechecking noise. Here are the main interesting things:graph_interp/main.rsandinterp/main.rs, add support for printing the ASCII waveform output with--ascii-waveformwaveformstate which is just aFxHashMap<PortId, Vec<BitVecValue>>. An output isDontCareif any of its combinationally dependent inputs isDontCare. We do the same logic ingraph_interpreter.rs.Diffing AST and Graph Interp
kexcuted successfully/failed") , graph serialization with--graphout, and ASCII waveforms go to stdout. The detailed error messages go to stderr. I hope this is okay, or maybe we could add a flag that toggles detailed errors on/off or how they route in the CLI. This applies to interpreter/graph-interpreter only, not to monitor/bi. I then switched the runt targets to use the binaries directly instead ofcargo run, so that stderr is clean with only the error messages (it doesn't have the noise fromcargo run. This way, the waveform tests can check the trace results are the same and the waveform is the same, without dealing with warning or error messages being different. All the other tests just route the stderr back in with stdout with2>&1so there is no change for them. It also removes all the annoying typechecking warnings from the diff, as in issue Disable Type Inference Info in test/serialization outputs #263.There are a few tests where our ability to identify that the waveforms are actually the same is lacking. For example an output that is dependent on inputs that we're dontcare in the previous cycle. I checked the ones that are failing and they are all passing with my eye-test, but I've excluded them for now and added to the issues.