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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ payload as the first field and a packed bit vector as a second field. The
padding for each payload is set to ensure all padded payloads have the same bit
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"?

mutated, for example by the type inference.

# Versioning Scheme of this Document

This is the versioning scheme that applies to version 1.0.0 and later.
Expand Down