mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 09:28:12 +02:00
several major fixes surrounding packed arrays
- entirely new PackedArray conversion (always flattens) - typedef and struct correctly order packed ranges when combining types - Stmt LHS traversal no longer traverses nested statements to avoid double conversion - Logic conversion applies to `initial` blocks` - new and modified tests to cover these cases
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
typedef struct packed {
|
||||
logic x;
|
||||
logic [3:0] y;
|
||||
logic [1:0] z;
|
||||
} Struct_t;
|
||||
|
||||
module Unpacker(in, select, a, b, c);
|
||||
parameter WIDTH = 8;
|
||||
input Struct_t [WIDTH-1:0] in;
|
||||
input logic [$clog2(WIDTH)-1:0] select;
|
||||
output logic a;
|
||||
output logic [3:0] b;
|
||||
output logic [1:0] c;
|
||||
assign a = in[select].x;
|
||||
assign b = in[select].y;
|
||||
assign c = in[select].z;
|
||||
endmodule
|
||||
Reference in New Issue
Block a user