Scoped Queries Guidelines - Scoped Queries Guidelines - 2026.1 English - UG903

Vivado Design Suite User Guide: Using Constraints (UG903)

Document ID
UG903
Release Date
2026-07-01
Version
2026.1 English

For this flow to work smoothly, write XDC constraints so their effects remain local to the IP or sub-module instance. Vivado can scope queries to a specific hierarchy level, as shown previously in Constraints Scoping. When developing constraints for an IP or sub-level module, understand how the query commands behave.

  • Limit cell/net/pin queries to the scoped instance and its sub-levels using the following command:
    get_cells <name pattern>
    get_nets <name pattern>
    get_pins <name pattern>
    • The NAME property shows the full path from the top level, rather than relative to the scoped instance.
    • Use the -filter option with a glob match that starts with * for name patterns as shown in the following example:
      get_nets -hierarchical -filter {NAME =~ *clk}
  • If the net connects directly to a top-level port, get_ports returns the top-level port; otherwise, it returns a hierarchical pin.
  • Limit netlist helper commands to the scope of the current instance by using the following commands:
    • all_ffs
    • all_latches
    • all_rams
    • all_registers
    • all_dsps
    • all_hsios
  • Avoid I/O helper commands in scoped XDC files:
    • all_inputs
    • all_outputs
  • Clock commands are not scoped and returns all timing clocks of your design.
    • get_clocks
    • all_clocks
  • Retrieve top-level or local clock by probing the netlist with get_clocks -of_objects.
    • Use the following command for a clock entering the current instance:
      get_clocks -of_objects [get_ports <interfacePinName>]
    • Use the following command for a clock generated inside the current instance, where instName is a clock generator instance:
      get_clocks -of_objects [get_pins <instName/outPin>]
  • Query objects in the design using a parent object context with the -of_objects option:
    get_pins -leaf -of_objects [get_nets local_net]
  • Query top‑level ports connected to current instance interface nets:
    get_ports -of_objects [get_nets <scoped_instance_net>]
  • Avoid querying IP or sub‑module interface pins directly. For example, get_pins clk returns an error.
  • Scope path tracing commands so all_fanin and all_fanout traverse only within the scoped design and stop at its boundary.
  • Target specific objects efficiently with get_cells, get_pins, or get_nets. Use specific patterns instead of broad commands like the following:
    all_registers -clock
    Broad queries can return large collections of objects, which can negatively impact runtime.