Get a list of HDL objects in one or more HDL scopes as per the specified pattern
Syntax
get_objects [‑filter <arg>] [‑r] [‑local] [‑regexp] [‑nocase] [‑quiet]
[‑verbose] [<patterns>...]
Returns
Returns all the objects found given the specified pattern
Usage
Name | Description |
---|---|
[-filter]
|
filters <patterns> according to the specified property-matching expressions |
[-r]
|
Searches recursively for objects |
[-local]
|
Searches objects in the subprogram frame selected for the current scope |
[-regexp]
|
Search using regular expressions, search design objects from which to create wave objects by design object name. The application supplying the design objects determines how the match is to be performed. Items must be strings. |
[-nocase]
|
Perform a case insensitive match (only used with regexp) |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
[<patterns>]
|
Patterns to search for. Default is * where all HDL objects are returned |
Categories
Description
Returns a list of HDL objects matching the specified search pattern in one or more HDL scopes.
HDL objects include HDL signals, variables, or constants as defined in the Verilog or VHDL test bench and source files. An HDL signal includes Verilog wire or reg entities, and VHDL signals. Examples of HDL variables include Verilog real, realtime, time, and event. HDL constants include Verilog parameters and localparams, and VHDL generic and constants.
The HDL scope, or scope, is defined by a declarative region in the HDL code such as a module, function, task, process, or begin-end blocks in Verilog. VHDL scopes include entity/architecture definitions, block, function, procedure, and process blocks.
Arguments
-r
- (Optional) Apply the command to the current scope, and all sub-scopes of the current scope.
-regexp
- (Optional) Specifies that the search <patterns> are written as regular expressions. Both search <patterns> and -filter
expressions must be written as regular expressions when this argument is used. Xilinx regular expression Tcl commands are always anchored to the start of the search string. You can add ".*" to the beginning or end of a search string to widen the search to include a substring. See http://perldoc.perl.org/perlre.html for help with regular expression syntax.
regexp
is not anchored, and works as a standard Tcl command. For more information refer to http://www.tcl.tk/man/tcl8.5/TclCmd/regexp.htm.
-nocase
- (Optional) Perform case-insensitive matching when a pattern has been specified. This argument applies to the use of -regexp
only.
-filter
<args> - (Optional) Filter the results list with the specified expression. The -filter
argument filters the list of objects returned by get_objects
based on property values on the objects. You can find the properties on an object with the report_property
or list_property
commands. In the case of the HDL object, "NAME", "SCOPE" and "TYPE" are some of the properties that can be used to filter results.
get_pins * -filter {DIRECTION == IN && NAME !~ "*RESET*"}
bool
) type properties can be directly evaluated in filter expressions as true or not true: -filter {IS_PRIMITIVE && !IS_LOC_FIXED}
-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.- <patterns> - Specifies only the search pattern for the objects to get. This method returns all objects in the current scope (and any sub-scopes when
-recursive
is used). - <scope>/<pattern> - Specifies the scope of interest, relative to the current scope, and the pattern for objects to locate. In this case, the specified <scope>, and any sub-scopes of it if
-recursive
is used, are identified starting from the current scope. Then all objects matching the search <pattern> are identified and returned.
Examples
current_scope ./cpuEngine
get_objects
llength [get_objects]
182
llength [get_objects -recursive ]
2182
cl*
pattern in those scopes are returned:
get_objects -recursive -filter {type == internal_signal} cpuEngine/cl*
/top/cpuEngine/clk_i
/top/cpuEngine/iwb_biu/clk
/top/cpuEngine/iwb_biu/clmode
/top/cpuEngine/or1200_cpu/clk
...
/top/cpuEngine/or1200_immu_top/or1200_immu_tlb/itlb_mr_ram/clk
get_objects -recursive -filter {type == internal_signal} ma* cl*