mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-29 01:03:29 +02:00
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.
42 lines
573 B
Verilog
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
|