current_scope - 2024.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
UG835
Release Date
2024-05-30
Version
2024.1 English

Get the current scope or set the current scope

Syntax

current_scope [‑quiet] [‑verbose] [<hdl_scope>]

Returns

The current scope.

Usage

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

Categories

Description

Return the current scope in the current simulation, or set the current scope to the specified HDL scope.

The current_scope command returns the name of the current simulation scope.

If <hdl_scope> is supplied then, the current scope is set to the specified scope.

Arguments

-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.

<hdl_scope> - (Optional) Specify an HDL scope to assign as the current scope of the current simulation. The scope can be specified as an absolute hierarchical path name (such as /tb/UUT), a relative path name (/uut, gt, ./gt, uut/fg) of a scope, or an HDL scope object, returned by the get_scopes command.

Tip: If you specify '/' as the HDL scope, the scope is reset to the top-level scope in the current simulation.

Examples

The following example sets the current scope to the specified HDL scope:

current_scope /testbench/dut

This example returns the current scope name to console:

current_scope