mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 09:28:12 +02:00
support struct patterns with partial defaults (resolves #35)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
module top;
|
||||
typedef struct packed {
|
||||
logic a;
|
||||
logic b;
|
||||
} foo_t;
|
||||
foo_t foo;
|
||||
initial begin
|
||||
foo = '{a: 1'b1, default: '0};
|
||||
$display(foo, foo.a, foo.b);
|
||||
end
|
||||
endmodule
|
||||
@@ -0,0 +1,4 @@
|
||||
module top;
|
||||
reg [1:0] foo = {1'b1, 1'b0};
|
||||
initial $display(foo, foo[1], foo[0]);
|
||||
endmodule
|
||||
Reference in New Issue
Block a user