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.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
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.
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