Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 4/03/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

4.1.5.10. dni::current_instance (::quartus::dcmd_dni)

The following table displays information for the dni::current_instance Tcl command:

Tcl Package and Version

Belongs to ::quartus::dcmd_dni

Syntax dni::current_instance [-h | -help] [-long_help] [ <instance> ]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
<instance> An instance name relative to the current instance
Description
This command sets the instance as current point of reference for
object names (e.g. relative path names) used in object query commands.
This command returns the new current instance hierarchy or empty if
current is design top.

If no instance name specified, the current instance is set to the
current design top. If instance name specified as ".", the current
instance is not changed. If instance name specified as "..", move
current instance one level up in the hierarchy.

The instance name can include any number of ".." (separated by
hierarchy separators '|') as well as hierarchy instance names. 

The new current instance cannot be a leaf cell.
Example Usage
move current instance up two levels
dni::current_instance ..|..

# move current instance to foo under parent of current instance
dni::current_instance ..|foo

# Save the current instance
set saved_ci [dni::current_instance .]

# make the design top the new current instance
dni::current_instance

# query top-level objects
set top_level_foo [dni::get_cells foo]

# restore saved current instance
current_instance $saved_ci
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful