Skip to content

Find solution to translate values to strings for Symbiyosys vcd files #254

Description

@nmigen-issue-migration

Issue by RobertBaruch
Monday Oct 14, 2019 at 14:23 GMT
Originally opened as m-labs/nmigen#254


When dumping the result of covers and counterexamples, Symbiyosys writes .vcd files. However, any signals that were enums or FSM states are no longer strings, but just plain old binary.

In gtkwave, it's possible to select a signal and then Edit > Data Format > Translate Filter File. You can then select a filter file, which is just a map of original value to string value:

00 ZERO
01 FIRST
02 TOOOO

The configuration can also be saved in a .gtkw file. However, this only affects displayed signals. If you delete the signal and display it again, it is not translated. This is horrible.

Proposal:

Better might be to just go into the vcd file and edit the values. Although it would require an extra step, I wouldn't object to something like this:

python3 <toplevel.py> stringify <input_vcd> -o <output_vcd>

This would parse the input vcd file, replace numeric values with string values for enum and fsm states, and output the result.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions