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

Request to change from typdef enum int to typedef enum logic to resolve Lint Issues. #91

Closed
amullick007 opened this issue Mar 26, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@amullick007
Copy link

Hi,

We are currently getting some Lint failures due to the usage of "typedef enum int" statements in the generated RTL files from RDL for Register index.

Can we change these to "typedef enum logic" to keep Lint happy?

Regards,
Avirup

@amykyta3
Copy link
Member

Can you share an example?
I don't know of any uses of typedef enum int anywhere. Are you referring to the enum definitions that are typedef enum {...} name_t?

@calebofearth
Copy link

@amykyta3, I think the original occurrence of typedef enum int may have manually been inserted into a reg file rather than generated. But we are seeing the typedef enum {...} syntax you mentioned - here's an example generated from peakrdl-regblock version 0.21.0. This defaults to typedef enum int per IEEE 1800-2017, 6.19, so it's effectively the same issue.
For synthesis, these should be 4-state variables.
Thanks.

@amykyta3
Copy link
Member

Yep aware of that. Just checking in case something else was going on in a different part of the tool.
Will change so that it declares the enum based on the bitwidth of the largest enum member. Note that with RDL enums, it is not possible to size it based on the field it is assigned to since RDL enums can potentially be shared across multiple different sized fields.

@amykyta3 amykyta3 added the feature request New feature or request label Mar 30, 2024
@amykyta3
Copy link
Member

Will be fixed in upcoming release

@calebofearth
Copy link

Excellent, thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants