Files
iverilog/ivtest/ivltests/function6.v
T
Stephen Williams cea237b407 Add ivtest to the iverilog source tree
By adding ivtest to the iverilog source tree, it is easier to keep
the regression test synchronized with the source that is being tested.
This should be especially helpful for PRs that add a new feature, and
have a matching ivtest PR with the regression test for that feature.
2022-01-15 10:18:50 -08:00

27 lines
342 B
Verilog

module test;
function f_0;
input i;
begin
f_0 = f_1(i);
end
endfunction
function f_1;
input i;
begin
f_1 = !i;
end
endfunction
wire w = f_0(1'b0);
initial begin
#1;
if ( w !== 1'b1)
$display ("FAILED w (%b) !== 1'b1", w);
else
$display ("PASSED");
end
endmodule