mirror of
https://github.com/zachjs/sv2v.git
synced 2026-08-30 01:18:10 +02:00
fix missing top reference renames in param type instantiation
- renaming applies to nodes within generate blocks - renaming applies to LHSs
This commit is contained in:
@@ -1,8 +1,15 @@
|
||||
module Module;
|
||||
parameter int S;
|
||||
parameter type T;
|
||||
T x = '1;
|
||||
initial $display("Module %0d: %b, %0d", S, Module.x, $bits(T));
|
||||
module Module #(
|
||||
parameter int S,
|
||||
parameter type T
|
||||
);
|
||||
T x;
|
||||
if (S) begin : a
|
||||
if (S) begin : b
|
||||
assign Module.x = '1;
|
||||
logic [$bits(Module.x):0] y = 'z;
|
||||
end
|
||||
end
|
||||
initial $display("Module %0d: %b %0d %b %0d", S, Module.x, $bits(T), Module.a.b.y, $bits(Module.a.b.y));
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
module Module;
|
||||
parameter S = 0;
|
||||
parameter T = 0;
|
||||
wire [T-1:0] x = 1'sb1;
|
||||
initial $display("Module %0d: %b, %0d", S, Module.x, T);
|
||||
wire [T-1:0] x;
|
||||
generate
|
||||
if (S) begin : a
|
||||
if (S) begin : b
|
||||
assign Module.x = 1'sb1;
|
||||
wire [T:0] y = 1'sbz;
|
||||
end
|
||||
end
|
||||
endgenerate
|
||||
initial $display("Module %0d: %b %0d %b %0d", S, Module.x, T, Module.a.b.y, T + 1);
|
||||
endmodule
|
||||
|
||||
module top;
|
||||
|
||||
Reference in New Issue
Block a user