Files
iverilog/ivtest/ivltests/sv_ps_function2.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
363 B
Verilog

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