mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 17:31:40 +02:00
fix struct/interface/logic conversion interactions
- interface conversion only waits for type resolution of modports - typeof conversion resolves struct field accesses - logic conversion only converts logic data declarations - struct conversion only converts within modules - fix nested type traversal order causing premature struct conversion
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
typedef struct packed {
|
||||
logic c, d;
|
||||
} T;
|
||||
typedef struct packed {
|
||||
logic a, b;
|
||||
T y;
|
||||
} S;
|
||||
|
||||
interface I;
|
||||
S x;
|
||||
type(x.y) w;
|
||||
modport D(input x);
|
||||
endinterface
|
||||
|
||||
module M(m);
|
||||
I.D m;
|
||||
initial begin
|
||||
$display("%b", m.x.a);
|
||||
$display("%b", m.x.b);
|
||||
$display("%b", m.x.y.c);
|
||||
$display("%b", m.x.y.d);
|
||||
end
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
I i();
|
||||
M m(i);
|
||||
assign i.x = 4'b1001;
|
||||
initial i.w = 2'b10;
|
||||
endmodule
|
||||
Reference in New Issue
Block a user