support converting interfaces with parameters

This commit is contained in:
Zachary Snow
2019-10-20 15:58:37 -04:00
parent 5843ef3879
commit 06411d70f1
4 changed files with 49 additions and 20 deletions
+9 -4
View File
@@ -1,11 +1,16 @@
interface Foo;
function bar;
parameter MULTIPLIER = 7;
function integer bar;
input integer x;
return x * x;
return x * x * MULTIPLIER;
endfunction
endinterface
module top;
Foo foo();
initial $display(foo.bar(3));
Foo foo_1();
Foo #(.MULTIPLIER(8)) foo_2();
initial begin
$display(foo_1.bar(3));
$display(foo_2.bar(3));
end
endmodule