all_rams - 2024.1 English

Vivado Design Suite Tcl Command Reference Guide (UG835)

Document ID
Release Date
2024.1 English

Get a list of ram cells in the current design


all_rams [‑quiet] [‑verbose]


List of ram cell objects.


Name Description
[-quiet] Ignore command errors
[-verbose] Suspend message limits during command execution




Returns a list of all the RAM cell objects present in the current instance, including block RAMs, block RAM FIFOs, and Distributed RAMs. These RAM cell objects can be assigned to a variable or passed into another command.

To get a list of specific RAM cells in the design, use the filter command to filter the results returned by all_rams based on properties assigned to the RAM cells. Properties of an object can be returned by the list_property or report_property commands.

The all_rams command is scoped to return the objects hierarchically, from the top-level of the design or from the level of the current instance. By default the current instance is defined as the top level of the design, but can be changed by using the current_instance command.


-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.
Note: Any errors encountered on the command-line, while launching the command, will be returned. Only errors occurring inside the command will be trapped.
-verbose - (Optional) Temporarily override any message limits and return all messages from this command.
Note: Message limits can be defined with the set_msg_config command.


The following example returns all RAM cells in the design:


This example returns all RAM cells in the design, and filters the results to return only the FIFO block memories:

filter [all_rams] {PRIMITIVE_SUBGROUP == fifo}

The following example sets the current instance, and returns all RAM objects hierarchically from the level of the current instance:

current_instance usbEngine0