svlint icon indicating copy to clipboard operation
svlint copied to clipboard

New Rule: Packed and unpacked arrays

Open ronitnallagatla opened this issue 1 year ago • 0 comments

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.

ronitnallagatla avatar Feb 13 '24 20:02 ronitnallagatla