mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 01:33:07 +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.
32 lines
553 B
Verilog
32 lines
553 B
Verilog
module top;
|
|
reg [4:1] res;
|
|
reg pass;
|
|
|
|
initial begin
|
|
pass = 1'b1;
|
|
res = 4'b0000;
|
|
fork
|
|
#3 res[3] = 1'b1;
|
|
#4 res[4] = 1'b1;
|
|
join_none
|
|
|
|
fork
|
|
#1 res[1] = 1'b1;
|
|
#2 res[2] = 1'b1;
|
|
join_any
|
|
|
|
if (res != 4'b0001) begin
|
|
$display("Error: Only first process should have run: %b", res);
|
|
pass = 1'b0;
|
|
end
|
|
|
|
wait fork;
|
|
if (res != 4'b1111) begin
|
|
$display("Error: All processes should have run: %b", res);
|
|
pass = 1'b0;
|
|
end
|
|
|
|
if (pass) $display("PASSED");
|
|
end
|
|
endmodule
|