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

add enum attributes to enum values #292

Open
rroohhh opened this issue Oct 11, 2024 · 2 comments
Open

add enum attributes to enum values #292

rroohhh opened this issue Oct 11, 2024 · 2 comments

Comments

@rroohhh
Copy link

rroohhh commented Oct 11, 2024

yosys and for example amaranth add enum_base_type and enum_value_{value} to variables that used to be enums a la

(* enum_base_type = "Port" *)
(* enum_value_000 = "Local" *)
(* enum_value_001 = "North" *)
(* enum_value_010 = "South" *)
(* enum_value_011 = "East" *)
(* enum_value_100 = "West" *)
(* src = "/data/projects/amaranth/amaranth/lib/stream.py:48" *)
wire [2:0] result__payload;
@zachjs
Copy link
Owner

zachjs commented Oct 21, 2024

Thanks for filing this issue! Are you looking to have these enum attributes for debugging, or do they result in some behavioral difference downstream?

@rroohhh
Copy link
Author

rroohhh commented Oct 21, 2024

Only for debugging, mainly to get the names in the waveform viewer.

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

No branches or pull requests

2 participants