get_rtl_pins (::quartus::rtl)

The following table displays information for the get_rtl_pins Tcl command:

Tcl Package and Version

Belongs to ::quartus::rtl 1.0

Syntax get_rtl_pins [-h | -help] [-long_help] [-hierarchical] [-nocase] [-tcl_string]
 
[ <filter> ]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-hierarchical Specifies use of a hierarchical searching method
-nocase Specifies case-insensitive node name matching
-tcl_string Specifies use of tcl string matching method
<filter> Valid destinations (string patterns are matched using Tcl string matching)
Description
Returns a collection of pins in the design. All pin names in the
collection match the specified pattern. Wildcards can be used to
select multiple pins at once.

There are three Tcl string matching schemes available with this
command: the default method, the -hierarchical option and -tcl_string option.

By default, pipe characters are used to separate one hierarchy level
from the next. They are treated as special characters and are taken
into account when string matching with wildcards is performed. When
the default matching scheme is enabled, the specified pattern is
matched against absolute pin names: the names that include the entire
hierarchical path. All hierarchy levels in the pattern are matched
level by level. Pin names of the form <absolute full cell name>|<pin
suffix> are used for matching. Note that a full cell name can contain
multiple pipe characters in it to reflect the hierarchy. Any included
wildcards refer to only one hierarchical level. For example, "*|*" and
"*|*|*" produce different collections since they refer to the highest
hierarchical level and second highest hierarchical level respectively.

When using the -hierarchical matching scheme, pipe characters are
treated as special characters and are taken into account when string
matching with wildcards is performed. This matching scheme forces the
search to proceed recursively through the hierarchy. The specified
pattern is matched against the relative pin names: the immediate names
that do not include any of the hierarchy information.  Pin names of
the form <relative short cell name>|<pin suffix> are used for
matching. Note that a short cell name cannot contain pipe
characters. Any included wildcards are expanded to match the relative
pin names.  For example, "*" and "*|*" match exactly the same pins
since the former is expanded into the latter.

The -tcl_string matching scheme uses the simple Tcl string matching on 
absolute cell names. Pipe characters are not treated as special characters
when used with wildcards.

The filter for the collection is a Tcl list of wildcards, and must
follow standard Tcl substitution rules. 
Example Usage
# Get regout pin of "reg" cell
get_rtl_pins -nocase reg|regout
# Create a collection of all pins of "reg" cell
get_rtl_pins reg|*
# Create a collection of all pins on the highest hierarachical level
set mycollection [get_rtl_pins *]
# Output pin names.
foreach_in_collection pin $mycollection {
    puts [get_rtl_pin_info -name $pin]
}
# Create a collection of all pins in the design
set fullcollection [get_rtl_pins -hierarchical *]
# Output pin IDs and names.
foreach_in_collection pin $fullcollection {
    puts -nonewline $pin
    puts -nonewline ": "
    puts [get_rtl_pin_info -name $pin]
}
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Can't read compiler database. Run the Analysis and Synthesis (quartus_map) successfully before using this command.
TCL_ERROR 1 ERROR: You must open a project before you can use this command.
TCL_ERROR 1 ERROR: sgate netlist does not exist. Use load_rtl_netlist to create the sgate netlist.
TCL_ERROR 1 ERROR: Cannot find object of ID <string>. Specify an existing object ID.