verilator/test_regress/t/t_past_bad.v

21 lines
533 B
Systemverilog
Raw Normal View History

2018-09-23 19:09:47 +00:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2018 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
2018-09-23 19:09:47 +00:00
2021-03-28 18:05:16 +00:00
module t (/*AUTOARG*/
// Inputs
d, clk, num
);
2018-09-23 19:09:47 +00:00
input d;
input clk;
2021-03-28 18:05:16 +00:00
input int num;
2018-09-23 19:09:47 +00:00
always @ (posedge clk) begin
2021-03-28 18:05:16 +00:00
if ($past(d, num)) $stop; // IEEE 16.9.3 must be const
if ($past(d, 0)) $stop; // IEEE 16.9.3 must be >= 0
2018-09-23 19:09:47 +00:00
if ($past(d, 10000)) $stop; // TICKCOUNT
end
endmodule