mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 17:31:40 +02:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user