verilator/test_regress/t/t_repeat.v

37 lines
814 B
Coq
Raw Normal View History

2009-02-26 03:06:59 +00:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed into the Public Domain, for any use,
// without warranty, 2009 by Wilson Snyder.
module t (/*AUTOARG*/);
reg signed [2:0] negcnt;
integer times;
initial begin
times = 0;
repeat (1) begin
repeat (0) $stop;
repeat (-1) $stop;
negcnt = 'sb111;
2010-02-14 15:01:21 +00:00
// Not all commercial simulators agree on the below stopping or not
// verilator lint_off WIDTH
2009-02-26 03:06:59 +00:00
repeat (negcnt) $stop;
2010-02-14 15:01:21 +00:00
// verilator lint_on WIDTH
2009-02-26 03:06:59 +00:00
repeat (5) begin
repeat (2) begin
times = times + 1;
end
end
end
if (times != 10) $stop;
//
2017-12-27 02:35:08 +00:00
// verilator lint_off INFINITELOOP
2009-02-26 03:06:59 +00:00
forever begin
2017-12-27 02:35:08 +00:00
// verilator lint_on INFINITELOOP
2009-02-26 03:06:59 +00:00
$write("*-* All Finished *-*\n");
$finish;
end
end
endmodule