EmptyArgs conversion skips global functions until nested

This commit is contained in:
Zachary Snow
2019-09-11 21:04:57 +02:00
parent 4d0d652c86
commit dd3a7e687c
3 changed files with 40 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
package evil_pkg;
localparam Z = 1;
localparam A = Z;
localparam B = Z;
function logic evil_fun;
return A;
endfunction
endpackage
module evil_mdl (
output logic [evil_pkg::B-1:0] foo
);
initial foo = evil_pkg::evil_fun();
endmodule
module top;
logic [evil_pkg::B-1:0] foo;
evil_mdl x(foo);
initial $display(foo);
endmodule
+17
View File
@@ -0,0 +1,17 @@
module evil_mdl (
output reg [evil_pkg_B-1:0] foo
);
localparam evil_pkg_Z = 1;
localparam evil_pkg_A = evil_pkg_Z;
localparam evil_pkg_B = evil_pkg_Z;
initial foo = evil_pkg_A;
endmodule
module top;
localparam evil_pkg_Z = 1;
localparam evil_pkg_A = evil_pkg_Z;
localparam evil_pkg_B = evil_pkg_Z;
wire [evil_pkg_B-1:0] foo;
evil_mdl x(foo);
initial $display(foo);
endmodule