mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-08-22 13:57:18 +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.
30 lines
338 B
Verilog
30 lines
338 B
Verilog
module dut(i, o);
|
|
|
|
input logic [3:0] i;
|
|
output logic [3:0] o;
|
|
|
|
always @* o = i;
|
|
|
|
endmodule
|
|
|
|
module test();
|
|
|
|
logic [3:0] i, o;
|
|
|
|
dut dut(i, o);
|
|
|
|
reg failed = 0;
|
|
|
|
initial begin
|
|
i = 4'b01xz;
|
|
#0 $display("%b %b", i, o);
|
|
if (o !== 4'b01xz) failed = 1;
|
|
|
|
if (failed)
|
|
$display("FAILED");
|
|
else
|
|
$display("PASSED");
|
|
end
|
|
|
|
endmodule
|