get_macros - get_macros - 2026.1 English - UG903

Vivado Design Suite User Guide: Using Constraints (UG903)

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

Use get_macros to return macro objects in a design.

get_macros Syntax

get_macros [pattern]

With no arguments, get_macros returns all macros in the design. If you specify macro names, the command returns the corresponding macro objects.

get_macros Examples

% create_macro m1
% update_macro m1 {u2/sr0 X0Y0 u2/sr1 X0Y1}
% get_cells -of [get_macros m1]
u2/sr0 u2/sr1

% get_macros -of [get_cells u2] 
m1

The following command returns all macros fully contained within the cells.

get_macros -of [get_cells $cells]

You can also use indirect combinations, such as:

get_macros -of [get_cells -of [get_pblocks pb0]]

This command returns the macros contained within Pblock pb0.