Example: Assign the Variable rloc to the String Value of a Block RAM Cell RLOC - 2024.1 English

Vivado Design Suite User Guide: Using Constraints (UG903)

Document ID
UG903
Release Date
2024-06-15
Version
2024.1 English
% set rloc [getAbsRLOC $ram0] 
X33Y0

The Tcl dict command can be used to build a dictionary (associative array) of cells and absolute grid RLOCs for the update_macro command. A Tcl associative array is a series of key-value pairs. The cells and RLOCs can be arranged as such as series using the dict command. The array keys are the macro cell objects. The array values are the cell RLOCs. This helps to automate the process of creating macros with many cells. The following example uses the absolute grid, but the method can be applied to the normal grid as well.

Assuming $cells is the list of macro cells, and each cell of $cells has been placed to form the desired macro pattern, the following Tcl proc creates a list of cell-RLOC pairs for the update_macro command.


proc buildRLOCList {cells} {
  set rlocs [dict create] # initialize dictionary   called rlocs
  foreach cell $cells {
  # dictionary key is cell, value is absolute   RLOC
    dict set rlocs $cell [getAbsRLOC $cell]
  }
  return $rlocs
}