mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 17:31:40 +02:00
- 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
18 lines
399 B
Systemverilog
18 lines
399 B
Systemverilog
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
|