Print, in textual format, stack frames when current_scope is a process waiting inside subprogram
Syntax
report_frames [‑quiet] [‑verbose]
Returns
Returns string
Usage
Name | Description |
---|---|
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
Categories
Description
Returns a list of strings of sub-program names, and the calling HDL process in the sub-program call hierarchy for the current HDL process scope, or current_scope
. The list starts with the HDL process till the most recent sub-program in the hierarchy. Each frame has an associated frame-index. The most recent sub-program is shown at the top, and has an index "0". The symbol (->) is used to indicate the current_frame
.
By default, the most recently called sub-program frame is the current_frame
. Other frames can be selected using current_frame
command. In verbose mode, output gives the source line-file information for each and every call.
report_frames
strictly follows the current_scope
. If the current_scope
is not an HDL process scope waiting inside a sub-program, the command returns an empty list.This command returns the name of the design object of the current_instance, or returns nothing when set to the top of current design.
Arguments
-verbose
- (Optional) Verbose mode. Gives source line-file information for every call. The source file name would include its absolute full path.
-quiet
- (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
Examples
module top;
int i;
function void f(input int in1);
automatic int a;
a = in1 + 7;
$display($time, " in f :: a %d in1 %d ", a, in1);
endfunction
task automatic t(input int in2);
int b;
b = in2 + 10;
$display($time, " in t :: in2 %d b %d ", in2, b);
#5;
f(b); // Case C
$display($time, " Back in t : after wait and f(%d) ", b);
endtask
initial begin // "/top/Initial18_0"
$display($time, " in initial 1 ");
i = 200;
t(i); // Case B
$display($time, " Back in initial 1 after t(%d) ", i);
end
initial begin // "/top/Initial25_1"
$display($time, " in initial 2 ");
#2;
f(50); // Case A
$display($time, " Back in initial 2 after f(50) ");
end
endmodule
> current_scope
/top/Initial18_0
1. > report_frames
-> 0 : f
1 : t
2: /top/Initial18_0
2. > report_frames -verbose
-> 0 : f @top.v:6
1 : t @top.v:15
2 : /top/Initial18_0 @top.v:21