get_stacks - 2022.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
Release Date
2022.1 English

Get list of processes in a design, which are waiting inside a subprogram


get_stacks [‑of_instance <arg>] [‑quiet] [‑verbose]


Returns HDL scope objects (from the given arguments) which are processes waiting in a subprogram.


Name Description
[-of_instance] Default: NULL
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution



Returns list of HDL scopes for all the processes in a design which are waiting inside a subprogram. With -of_instance switch, the output can be limited to such processes of the given instance only.


-of_instance <HDL_Instance_scope> - (Optional) Get the list of processes (waiting inside a sub-program) for the specified HDL instances only.

-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.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.


The following example gets a list of all sites available on the target device:
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);
       task automatic t(input int in2);
           int b;
           b = in2 + 10;
           $display($time, " in t :: in2 %d b %d ", in2, b);
           f(b);    // Case C
           $display($time, " Back in t : after wait and f(%d) ", b);
       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);
       initial begin                         // "/top/Initial25_1"
           $display($time, " in initial 2 ");
           f(50);       // Case A
           $display($time, " Back in initial 2 after f(50) ");
When simulation is stopped inside function "f" for its call at 'Case A' , the two processes /top/Initial18_0, and /top/Initial25_1, are waiting inside task "t" (call at 'CaseB') and function "f" (call at 'CaseA') respectively.
1. > get_stacks
       /top/Initial18_0 /top/Initial25_1

See Also