Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 7/08/2024
Public
Document Table of Contents

2.6.5. The get_names Command

To query a filtered output collection of all matching node name IDs found in a compiled Quartus® Prime project, use the get_names command.

To access each element of the output collection, use the Tcl command foreach_in_collection . For get_names or foreach_in_collection command example, type get_names -long_help or foreach_in_collection -long_help.

  • If the -node_type option is not specified, the default value is all.
  • If the -observable_type option is not specified, the default value is all.
  • The node type pin includes input, output, bidir, assigned, unassigned, virtual, and pin.
  • The node type qsf include names from the .qsf settings file.
  • The node type all includes all node types.
  • The node type all_reg includes all node types and registers post-fitting.

The value for -observable_type option can be one of the following:

Table 9.  Values for observable_type Option
Observable Type Description
all Use post-Fitter information. If it is not available, post-synthesis information is used. Else, pre-synthesis information is used if it exists.
pre_synthesis Use pre-synthesis information.
post_synthesis Use post-synthesis information.
post_fitter Use post-Fitter information.
post_asm Use post-Assembler information. The post-Assembler information is supported only for designs using the HardCopy II device family.
stp_pre_synthesis Use Signal Tap pre-synthesis information.

Arguments

Following table lists the get_names command arguments:

Table 10.  The get_names Command Arguments
Argument Description
-h | -help Displays a short help.
-long help Displays a long help with examples and possible return values.
-entity<wildcard> Specifies the entity to get names from hierarchies instantiated by the entity.
-filter<wildcard> Specifies the node's full path name and wildcard characters.
-node_type <all|comb|reg|pin|input|output|bidir|hierarchy|mem|bus|qsf|state_machine|assigned|unassigned|all_reg|partition|virtual> Filters based on the specified node type.
-observable_type <all|pre_synthesis|post_synthesis|post_fitter|stp_pre_synthesis>] Filters based on the specified observable type.

Return Values

Following table lists values returned by the get_names command:

Table 11.  The get_names Command Return Values
Code Name Code String Returned
TCL_OK 0 INFO: operation successful
TCL_ERROR 1 ERROR: Can't find active revision name. Make sure there is an open, active revision name.
TCL_ERROR 1 ERROR: Get names cannot return <string> because the name was found in a partition that's not the root partition. Refine your get_names search pattern to exclude child partitions.
TCL_ERROR 1 ERROR: Compiler database does not exist for revision name: <string>. At the minimum, run Analysis & Synthesis with the specified revision name before using this Tcl command.
TCL_ERROR 1 ERROR: Illegal node type: <string>. Specify "all", "comb", "reg", "pin", "hierarchy", or "bus".
TCL_ERROR 1 ERROR: Illegal observable type: <string>. Specify "all", "pre_synthesis", "post_synthesis", or "post_fitter".
TCL_ERROR 1 ERROR: You must open a project before you can use this command.

Example Use

# Search for a single post-Fitter pin with the name accel and make assignments
set accel_name_id [get_names -filter accel -node_type pin -observable_type post_fitter]

foreach_in_collection name_id $accel_name_id {
   # Get the full path name of the node
   set target [get_name_info -info full_path $name_id]
   # Set multicycle assignment
   set_multicycle_assignment -to $target 2
   # Set location assignment
   set_location_assignment -to $target Pin_E22
  }
# Search for nodes of any post-Fitter node type with name length <= 5. The default node type is "all"
set name_ids [get_names -filter ????? -observable_type post_fitter]
foreach_in_collection name_id $name_ids {
   # Print the name id
   puts $name_id
   # Print the node type
   puts [get_name_info -info node_type $name_id]
   # Print the full path (which excludes the current focus entity from the path)
   puts [get_name_info -info full_path $name_id]
  }
# Search for nodes of any post-Fitter node type that end in "eed".
# The default node type is "all"
  set name_ids [get_names -filter *eed -observable_type post_fitter]
  foreach_in_collection name_id $name_ids {
   # Print the name id
   puts $name_id
   # Print the node type
   puts [get_name_info -info node_type $name_id]
   # Print the full path (which excludes the current
   # focus entity from the path)
   puts [get_name_info -info full_path $name_id]
  }