mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-02 19:48:30 +02:00
apply patterns to substructures
This commit is contained in:
@@ -35,6 +35,35 @@ module test;
|
||||
#1 a = '{w: 8, int: 3, byte: 2, default: 0};
|
||||
|
||||
end
|
||||
typedef struct packed {
|
||||
int x;
|
||||
struct_a y;
|
||||
logic z;
|
||||
} struct_b;
|
||||
struct_b b;
|
||||
initial begin
|
||||
#100;
|
||||
$monitor("%2d: %b %b %b %b", $time, b, b.x, b.y, b.z);
|
||||
|
||||
#1 b.x = 0;
|
||||
#1 b.y = 0;
|
||||
#1 b.z = 0;
|
||||
|
||||
#1 b = '{default: 1};
|
||||
#1 b = '{default: 2};
|
||||
#1 b = '{default: 3};
|
||||
#1 b = '{default: 0};
|
||||
#1 b = '{default: -1};
|
||||
#1 b = '{default: -2};
|
||||
|
||||
#1 b = '{int: 0, default: 1};
|
||||
#1 b = '{byte: 0, default: 1};
|
||||
#1 b = '{logic: 0, default: 1};
|
||||
#1 b = '{logic: 1, int: 2, byte: 3};
|
||||
#1 b = '{logic: 1, int: 2, byte: 3, default: -1};
|
||||
#1 b = '{int: 3, byte: 2, default: 0};
|
||||
|
||||
end
|
||||
endmodule
|
||||
|
||||
module top; endmodule
|
||||
|
||||
Reference in New Issue
Block a user