OrbitNTNU / electronics-verilator

Contains makefiles and examples for Verilator.
0 stars 0 forks source link

Add some support for automatically displaying enums in gtkwave. #15

Closed magnmaeh closed 6 months ago

magnmaeh commented 7 months ago

The flow is basically like this:

  1. An enum is written by the developer in a .sv file. The developer must use verilator directives to generate its equivalent in C++.
  2. The generated enum is parsed in Python. The names of the states and corresponding values are extracted.
  3. The names and values are written to a .gtkw save file. This save file can be used by the developer to display an enum's strings instead of values.

Add a README.md which explains how to use this in a step-by-step guide.