verilator/test_regress/t/t_stacktrace.v
2023-01-23 08:35:10 -05:00

28 lines
570 B
Systemverilog

// 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 automatic 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