better support for struct array parameters

This includes support for
- parsing dimensioned alias parameters
- flattening non-var decls with multiple packed dimensions
- converting arrays of structs
- inferring struct types for decls with initializations
This commit is contained in:
Zachary Snow
2019-08-06 23:11:09 -04:00
parent e82537fa97
commit 4fd7b6c2f2
5 changed files with 69 additions and 16 deletions
+17
View File
@@ -0,0 +1,17 @@
typedef struct packed {
logic [2:0] a;
logic [1:0] b;
logic [3:0] c;
} foo_s;
parameter foo_s [1:0] foo = {
'{ a: 2, b: 1, c: 0 },
'{ a: 1, b: 0, c: 2 }
};
module top;
initial begin
$display(foo[0]);
$display(foo[1]);
end
endmodule