Files
iverilog/ivtest/ivltests/sv_ps_function6.v
T
Lars-Peter Clausen 7df00d3070 Add additional regression for package scoped function calls
Check that width and sign determination works correctly for package scoped
function calls.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-12-27 20:01:29 -08:00

29 lines
503 B
Verilog

// Check that the signedness of package scoped functions is handled correctly,
// when passing the result of the function to a system function
package P;
function shortint s();
return -1;
endfunction
function bit [15:0] u();
return -1;
endfunction
endpackage
module test;
string s;
initial begin
s = $sformatf("%0d %0d", P::s(), P::u());
if (s == "-1 65535") begin
$display("PASSED");
end else begin
$display("FAILED s=%s", s);
end
end
endmodule