-
Notifications
You must be signed in to change notification settings - Fork 3
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Smart Waveform Printing #1
Comments
Yeah - this is an issue. I think it's hard to make a simple API function that will do the right thing in all cases, but there are a few default things I would personally change:
I think the display_rules argument provides a reasonable way of specifying which signals are shown (along with the order and some formatting options). I think the approach you suggest is very likely already implementable by calculating the "right" values for various arguments to the Finally, you may not have tried it yet, but I recommend setting up an interactive waveform application. Waveform expect tests get you a surprisingly long way, but sometimes looking at a larger waveform and being able to scroll and scale it really helps. It's often not much extra work if you set up your test library so it both performs short-ish running expect style tests and exposes longer more extensive test options for a full testbench application that can display an interactive waveform. |
Ah, I missed that! That's even better than what I was thinking of. I'll try to play around with this and the
I've tried the following:
but it doesn't seem to be writing any files when I run |
I have not tried the EXPECT_TEST_WAVEFORM flow with dune. Sounds like something might be up, as what you are doing seems like it should work. But what I was actually suggesting, was using the Hardcaml_waveterm_interactive library. With this flow, you create an application that embeds your simulation and the waveform viewer. Your application roughly just needs to look like
where |
This works!
We got stuck on this though. Looking through the source code, I'm assuming that the process is more-or-less as follows:
We're getting stuck on generating internal ports: whenever we launch the widget, we only see ports specified in the
and Is there anything we might be missing? |
trace_properties is not needed.
When you create the simulation, you decide what internal stuff to expose. In the latest code there is a config argument you can set to trace everything. Which Hardcaml version are you using?
The display rules can only show the things that are exposed from the simulator. I suspect this is the problem you are seeing. Aside - why? There can be a lot of internal ports, especially as designs grow. This has a measurable impact on performance as it requires a lot of copying. But that said, until you care about performance, you should just make the simulator expose everything.
You shouldn't need the expert module for this. |
Yeah, I think this is exactly the issue. We couldn't find config arguments to expose internal signals, so we assumed that configuration should occur in the waveform print / viewer.
We're on the latest bleeding release, v0.15~preview.124.35+330. The config fields we found for |
But actually, the way to do this is to pass the config argument as We haven't properly documented this, so we'll add it to our stack to improve matters. |
Ah, that makes sense. For some reason, I interpreted that as a setting for hiding signals. Maybe
It works! We just used it to debug some issues, and this has been the nicest hardware debugging experience I've had: definitely beats out managing and scrolling through Vivado simulation waveforms. One suggestion: collapsing nodes in the hierarchy is great for filtering down what's shown on screen, but there's still a decent amount of information shown. Display rules (and apparently This would allow quickly narrowing down displayed information to make tracing easier. An "expand all" button/keyboard shortcut might also make sense if this is implemented. |
I do have some plans for making this thing easier to configure. But frankly, the waveform viewer is now really old and crufty, and needs some love and attention. A lot of the issues you raise I think would be best supported by supplying a more flexible API for interacting with the viewers components so you can use it in the way you see fit. No promises on timescale though. |
I think many things here are resolved. Any more major changes will come with a new version of the tool. |
Hi! We've been using this library with expect tests as per this tutorial, and it's a huge step up from having to manually inspect waveforms in Vivado! One thing we've noticed is that there's a lot of tweaking needed to get the waveform to print neatly. By any chance, have you considered a "smart print" option? One could provide:
And the specific widths/heights could be automatically generated based on those to show the exact desired portion of the waveform.
This would also make it easier to focus expect tests on a particular property we want to check. From what I've seen, the waveform print utils currently show all input/output waves in a circuit, which can be a bit cluttered. If an includelist/excludelist of port names is provided, one testbench function could be used for multiple test cases, each of which assesses a different expected property. For example, this file has 3 tests. In the first one, it would be nice to only show
instruction
andrdest
. In the latter two, we don't really care aboutrt
,rs
,imm
, etc: only the control signals. Additionally, an includelist could be a way to order waves in a meaningful way.Another advantage of this proposed approach is that currently, if the display height is too small, waves could be truncated or omitted entirely without an error/warning. If display height is computed automatically, this wouldn't happen.
The text was updated successfully, but these errors were encountered: