rohd icon indicating copy to clipboard operation
rohd copied to clipboard

Generation of `struct`s and `enum`s in output SystemVerilog

Open mkorbel1 opened this issue 5 months ago • 3 comments
trafficstars

Motivation

It can be useful to generate SystemVerilog that has more context than just bare signals and arrays. For example, a struct instead of a bunch of independent signals, or an enum instead of a plain logic for states in an FSM.

Desired solution

A scalable solution that allows for enums and structs to be included in generated outputs. This would need to comprehend uniquification to avoid conflicts and legal types for assignments. It also needs to be controllable so that you can avoid generating structs and enums if you want to (e.g. for tool compatibility)

Alternatives considered

No response

Additional details

No response

mkorbel1 avatar May 22 '25 23:05 mkorbel1

+1 This would be very helpful

awmoore-intel avatar May 22 '25 23:05 awmoore-intel

Additionally, it would be nice to include this type of information in the generated waveforms.

mkorbel1 avatar May 29 '25 18:05 mkorbel1

Additionally, it could be nice to display parent structure (even when not an array) on Logics toString(), or elsewhere

mkorbel1 avatar Jun 12 '25 16:06 mkorbel1