mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-08 12:23:32 +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
422 B
Verilog
32 lines
422 B
Verilog
module bug();
|
|
|
|
reg clock = 0;
|
|
|
|
always begin
|
|
#1 clock = 1;
|
|
#1 clock = 0;
|
|
end
|
|
|
|
integer count = 0;
|
|
|
|
initial begin:counter
|
|
forever begin
|
|
repeat (2) @(posedge clock);
|
|
count = count + 1;
|
|
$display(count);
|
|
end
|
|
end
|
|
|
|
initial begin
|
|
repeat (5) @(posedge clock);
|
|
disable counter;
|
|
repeat (4) @(posedge clock);
|
|
if (count === 2)
|
|
$display("PASSED");
|
|
else
|
|
$display("FAILED");
|
|
$finish;
|
|
end
|
|
|
|
endmodule
|