mirror of
https://github.com/zachjs/sv2v.git
synced 2026-09-01 01:56:23 +02:00
support converting interfaces with parameters
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user