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

New Rule: Packed and unpacked arrays #279

Closed
ronitnallagatla opened this issue Feb 13, 2024 · 0 comments · Fixed by #280
Closed

New Rule: Packed and unpacked arrays #279

ronitnallagatla opened this issue Feb 13, 2024 · 0 comments · Fixed by #280

Comments

@ronitnallagatla
Copy link
Contributor

ronitnallagatla commented Feb 13, 2024

I'd like to implement a rule that disallows unpacked array declarations.

Unpacked arrays are not guaranteed to be represented as contiguous memory, and can cause issues with synthesis tools especially with how multidimensional arrays are synthesized.

logic [7:0] a; // packed array --> allowed
logic b [7:0]; // unpacked array --> disallowed

I'm not sure which RefNode captures this, I looked into RefNode::VariableDeclAssignment but I'm not sure how to unwrap it to get the information I need. Any hints or ideas would be helpful. Thanks.

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 a pull request may close this issue.

1 participant