mirror of
https://github.com/verilator/verilator.git
synced 2025-01-20 21:34:04 +00:00
5788bc8048
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
31 lines
592 B
Systemverilog
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
|