verilator/test_regress/t/t_stacktrace.v

28 lines
560 B
Systemverilog
Raw Normal View History

2022-11-18 00:12:54 +00:00
// DESCRIPTION: Verilator: Verilog Test module
//
// This file ONLY is placed under The Creative Commons Public Domain, for
// any use, without warranty, 2022 by Wilson Snyder.
// SPDX-License-Identifier: CC0-1.0
module t;
task t;
// verilator no_inline_task
string trace;
$display("== Trace Func");
trace = $stacktrace();
if (trace == "") $stop;
$display("%s", trace);
$display("== Trace Task");
$stacktrace;
$write("*-* All Finished *-*\n");
$finish;
endtask
initial t();
endmodule