mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 16:29:25 +02:00
Check that package scope function calls work with and without arguments as well as empty positional arguments. Signed-off-by: Lars-Peter Clausen <[email protected]>
21 lines
370 B
Verilog
21 lines
370 B
Verilog
// Check that it is possible to call a package scoped function.
|
|
|
|
package P;
|
|
function integer T(integer x, integer y);
|
|
return x + y;
|
|
endfunction
|
|
endpackage
|
|
|
|
module test;
|
|
initial begin
|
|
integer x;
|
|
x = P::T(1, 2);
|
|
if (x === 3) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED. x = %d, expected 3", x);
|
|
end
|
|
end
|
|
|
|
endmodule
|