verilator/test_regress/t/t_timing_class_static_delay.v
Krzysztof Bieganski 5788bc8048
Propagate class timescale to class package (#4348)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-07-07 17:27:33 +02:00

31 lines
592 B
Systemverilog

// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under the Creative Commons Public Domain, for
// any use, without warranty, 2023 by Antmicro Ltd.
// SPDX-License-Identifier: CC0-1.0
`define DELAY 10
class Foo;
task wait_dynamically();
#`DELAY;
endtask
static task wait_statically();
#`DELAY;
endtask
endclass
module t;
Foo foo = new;
initial begin
foo.wait_dynamically();
if ($time != `DELAY) $stop;
Foo::wait_statically();
if ($time != 2*`DELAY) $stop;
$write("*-* All Finished *-*\n");
$finish;
end
endmodule