Files
iverilog/ivtest/ivltests/br_gh337.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

42 lines
573 B
Verilog

`ifdef __ICARUS__
`define SUPPORT_TWO_STATE_NETS_IN_IVTEST
`endif
module test();
int x2;
int z2;
function int y2(int x);
endfunction
`ifdef SUPPORT_TWO_STATE_NETS_IN_IVTEST
wire int w2 = y2(x2);
`else
wire integer w2 = 0;
`endif
integer x4;
integer z4;
function integer y4(integer x);
endfunction
wire integer w4 = y4(x4);
initial begin
#1;
$display(w2);
z2 = y2(x2);
$display(z2);
$display(w4);
z4 = y4(x4);
$display(z4);
if (w2 === 0 && z2 === 0 && w4 === 'bx && z4 === 'bx)
$display("PASSED");
else
$display("FAILED");
end
endmodule