verilator/test_regress/t/t_repeat.v

34 lines
763 B
Systemverilog
Raw Normal View History

2009-02-26 04:06:59 +01:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain.
// SPDX-FileCopyrightText: 2009 Wilson Snyder
// SPDX-License-Identifier: CC0-1.0
2009-02-26 04:06:59 +01:00
module t;
2009-02-26 04:06:59 +01:00
2026-03-10 02:38:29 +01:00
reg signed [2:0] negcnt;
integer times;
initial begin
times = 0;
repeat (1) begin
repeat (0) $stop;
repeat (-1) $stop;
negcnt = 'sb111;
// Not all commercial simulators agree on the below stopping or not
// verilator lint_off WIDTH
repeat (negcnt) $stop;
// verilator lint_on WIDTH
repeat (5) begin
repeat (2) begin
times = times + 1;
end
2009-02-26 04:06:59 +01:00
end
2026-03-10 02:38:29 +01:00
end
if (times != 10) $stop;
//
$write("*-* All Finished *-*\n");
$finish;
end
2009-02-26 04:06:59 +01:00
endmodule