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 1.0

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

# 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