Files
iverilog/ivtest/ivltests/sv_ps_function3.v
T
Lars-Peter Clausen 6fe3e52085 Add regression tests for package scoped function calls
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]>
2022-09-20 20:44:27 +02:00

22 lines
412 B
Verilog

// Check that it is possible to call a package scoped function with empty
// positional arguments.
package P;
function integer T(integer x = 1, integer y = 2);
return x + y;
endfunction
endpackage
module test;
initial begin
integer x;
x = P::T(, 4);
if (x === 5) begin
$display("PASSED");
end else begin
$display("FAILED. x = %d, expected 5", x);
end
end
endmodule