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

Add RFC for structured VCD output #74

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

eigenform
Copy link

@eigenform eigenform commented Jan 22, 2025

@whitequark whitequark added meta:nominated Nominated for discussion on the next relevant meeting area:core RFC affecting APIs in amaranth-lang/amaranth labels Jan 22, 2025
@whitequark
Copy link
Member

whitequark commented Jan 22, 2025

Thank you, this is very well written! My comments:

  • Some examples of how the UI of GTKWave and Surfer will look like afterwards would be very helpful. (I think there are already RFCs which include media to use as an example.)
  • An alternative is to keep the ability to use both formats, via the use of an environment variable (which is useful if you want to upgrade a third party codebase without modifying it, in possibly many places) and/or a parameter to write_vcd().

(Edit: I now noticed the "Does this feature need to be gated/opt-in by default?" unresolved question, which would cover my second comment.)

@@ -204,9 +207,13 @@ $upscope $end
- Should we continue to include the "flattened" [pure bit-vector] representation of aggregate signals in the VCD?
- Does this feature need to be gated/opt-in by default?

- The simulator currently depends on [westerndigitalcorporation/pyvcd](https://github.com/westerndigitalcorporation/pyvcd) when writing VCD files.
However, `pyvcd` only emits scope types defined by the VCD specification (and does not include the `vhdl_record`/`vhdl_array` scopes).
When implementing this RFC, should we continue relying on `pyvcd`, or does this warrant the addition of our own code in the simulator for writing VCD files?
Copy link
Member

Choose a reason for hiding this comment

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

One reason to use pyvcd (VCD itself is not hard to emit) is its support for .gtkw files. I really don't want to have more GTKWave specific code in Amaranth...

@whitequark
Copy link
Member

Thinking about it, I feel that a prototype for this functionality would be not too difficult to build (you could depend on a git repo with a fork of pyvcd) and it would allow everyone impacted by the change to evaluate how it'll affect their workflow.

One consumer with little support for advanced VCD features that we need to care about is the Amaranth playground.

@whitequark whitequark closed this Jan 23, 2025
@whitequark whitequark reopened this Jan 23, 2025
@whitequark
Copy link
Member

I closed the PR accidentally (Shift+Enter), apologies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core RFC affecting APIs in amaranth-lang/amaranth meta:nominated Nominated for discussion on the next relevant meeting
Development

Successfully merging this pull request may close these issues.

2 participants