Skip to content

[minor][abi] Document type alias lowering#117

Open
uenoku wants to merge 1 commit intochipsalliance:mainfrom
uenoku:dev/hidetou/typealias-abi
Open

[minor][abi] Document type alias lowering#117
uenoku wants to merge 1 commit intochipsalliance:mainfrom
uenoku:dev/hidetou/typealias-abi

Conversation

@uenoku
Copy link
Collaborator

@uenoku uenoku commented Jul 6, 2023

Add sentence for type alias in abi

width as required by Verilog packed unions.

Type aliases shall be lowered to Verilog `typedef`{.verilog} with their inner types
recursively following these rules. Type aliases will be dropped if inner types are
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure we want to encode dropping in the ABI. This would imply, maybe incorrectly, that if they have any name it is a bug. Perhaps "changes to the structure of a type will result in changes to the name of a type". Width/type/reset inference is actually a situation where we probably want to mutate the type but preserve it's name or at least of that option.

Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm also a little leery of putting anything into the ABI for this. Aren't these aliases basically hints, and nothing is to be relied upon at the ABI level?

Should we say "there is no reliable mapping from type aliases to the emitted verilog, they are treated as hints only"?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants