svlint
svlint copied to clipboard
New Rule: Packed and unpacked arrays
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.