Absolute Grid Macro Examples - 2022.1 English

Vivado Design Suite User Guide: Using Constraints (UG903)

Document ID
Release Date
2022.1 English

When combining cells of different site types into a macro, you must use the absolute grid.

The absolute grid (also known as the RPM grid) is an absolute coordinate system that defines the coordinates of a site based on its location within the device. The absolute grid also considers the sizes of sites. RAM and DSP blocks have wider spacing than slices. The absolute grid is illustrated in the following figure:

In this example, there are cells from three different types to group into a macro using the absolute grid. The example consists of an input data path from input ports, through two stages of registers, then block RAMs. This is illustrated in the schematic in the following figure.

Figure 1. Example Circuit for Absolute Grid

The macro creation requires a list of cells and their relative locations (RLOCs) using the absolute grid. When creating the macro, it might be difficult to visualize the relative placement of absolute grid macros.

The cells are first manually placed and arranged in their desired locations as shown in the following figure:

Figure 2. Manually Placed Cells for an Absolute Grid Macro

Although the absolute grid specifies absolute locations, the resulting macro can be placed at any location within the device that can accommodate the relative placement of the macro. In this example, the relative locations are specified using the lower-left hand corner as the point of reference.

However, the absolute grid locations specify only relative placement, not absolute placement. That allows the macro to be located anywhere in the device that maintains the relative placement.

Because the example is somewhat complex, consisting of ILOGIC, slices, and block RAM, the macro locations are somewhat restricted but can be placed at any of the three locations highlighted in orange in the following figure:

Figure 3. Three Possible Locations for the XDC Macro

To determine absolute grid RLOCs, use the site RPM_X and RPM_Y properties. For example, the lower block RAM is placed at site RAMB36_X0Y0.

Selecting the site (not the cell) displays the following values of 33 for RPM_X and 0 for RPM_Y (Figure 4). These are the absolute grid coordinates. The corresponding RLOC value is X33Y0.

Figure 4. Absolute Grid Coordinates of a Block RAM

The same method is applied to determine the absolute RLOC of a slice (Figure 5). The cells within this slice have an RLOC of X31Y0.

Figure 5. Absolute Grid Coordinates of a Slice

There are two commands used to create the macro, with a name m0:

create_macro m0
update_macro m0 -absolute_grid <cell0 rloc0 cell1 rloc1 cell2 rloc2 … cellN rlocN>

If the macro contains many cells as it does in this example, Tcl can be used to simply building and specifying the cell-rloc list required by update_macro. Given a placed cell, the absolute grid RLOC can be determined using the following Tcl proc getAbsRLOC:

proc getAbsRLOC {cell} {
set site [get_sites -of [get_cells $cell]] set X [get_property RPM_X $site]
set Y [get_property RPM_Y $site] return "X${X}Y${Y}"