Hierarchical Macro Placement#

A hierarchical automatic macro placer for large-scale complex IP blocks, “Hier-RTLMP”. This tool builds on the existing RTLMP (mpl) framework, adopting a multilevel physical planning approach that exploits the hierarchy and data flow inherent in the design RTL.

Commands#

Note

  • Parameters in square brackets [-param param] are optional.

  • Parameters without square brackets -param2 param2 are required.

RTL Macro Placer#

This command executes the Hier-RTLMP algorithm for macro placement.

rtl_macro_placer 
    [-max_num_macro max_num_macro]
    [-min_num_macro min_num_macro]
    [-max_num_macro max_num_macro]
    [-max_num_inst max_num_inst]  
    [-min_num_inst min_num_inst] 
    [-tolerance tolerance]     
    [-max_num_level max_num_level] 
    [-coarsening_ratio coarsening_ratio]
    [-large_net_threshold large_net_threshold]
    [-halo_width halo_width]
    [-halo_height halo_height]
    [-fence_lx fence_lx] 
    [-fence_ly fence_ly]
    [-fence_ux fence_ux]
    [-fence_uy fence_uy]
    [-area_weight area_weight] 
    [-outline_weight outline_weight] 
    [-wirelength_weight wirelength_weight]
    [-guidance_weight guidance_weight]
    [-fence_weight fence_weight] 
    [-boundary_weight boundary_weight]
    [-notch_weight notch_weight]
    [-soft_blockage_weight soft_blockage_weight]
    [-target_util target_util]
    [-min_ar min_ar]
    [-report_directory report_directory]
    [-write_macro_placement file_name]
    [-keep_clustering_data]

Options#

Switch Name

Description

-max_num_macro, -min_num_macro

Maximum/minimum number of macros in a cluster. The default value is 0 for both, and the allowed values are integers [0, MAX_INT].

-max_num_inst, -min_num_inst

Maximum/minimum number of standard cells in a cluster. The default value is 0 for both, and the allowed values are integers [0, MAX_INT].

-tolerance

Add a margin to the minimum and maximum number of macros/std cells in a cluster. For min, we multiply by (1 - tol), and for the max (1 + tol). This is to improve the robustness of hierarchical clustering. The allowed values are floats [0, 1), and the default value is 0.1.

-max_num_level

Maximum depth of physical hierarchical tree. The default value is 2, and the allowed values are integers [0, MAX_INT].

-coarsening_ratio

The larger the coarsening_ratio, the faster the convergence process. The allowed values are floats, and the default value is 10.0.

-large_net_threshold

Ignore nets with many connections during clustering, such as global nets. The default value is 50, and the allowed values are integers [0, MAX_INT].

-halo_width

Deprecated: use set_macro_base_halo instead. Horizontal halo around macros (microns). The default value is 0.0.

-halo_height

Deprecated: use set_macro_base_halo instead. Vertical halo around macros (microns). The default value is 0.0.

-fence_lx, -fence_ly, -fence_ux, -fence_uy

Defines the global fence bounding box coordinates. The default values are the core area coordinates).

-target_util

Specifies the target utilization. The allowed values are floats and the default value is 0.25.

-min_ar

Specifies the minimum aspect ratio \(a\), or the ratio of its width to height of a StandardCellCluster from \([a, \frac{1}{a}]\). The allowed values are floats, and the default value is 0.33.

-report_directory

Save reports to this directory.

-write_macro_placement

Generates a file with the design’s macro placement in the format of calls for the place_macro command.

-keep_clustering_data

Save the hierarchy generated by MPL’s clustering engine in the form of dbGroups inside ODB.

Simulated Annealing Weight parameters#

Do note that while action probabilities are normalized to 1.0, the weights are not necessarily normalized.

Switch Name

Description

-area_weight

Weight for the area of current floorplan. The allowed values are floats, and the default value is 0.1.

-outline_weight

Weight for violating the fixed outline constraint, meaning that all clusters should be placed within the shape of their parent cluster. The allowed values are floats, and the default value is 100.0.

-wirelength_weight

Weight for half-perimeter wirelength. The allowed values are floats, and the default value is 100.0.

-guidance_weight

Weight for guidance cost or clusters being placed near specified regions if users provide such constraints. The allowed values are floats, and the default value is 10.0.

-fence_weight

Weight for fence cost, or how far the macro is from zero fence violation. The allowed values are floats, and the default value is 10.0.

-boundary_weight

Weight for the boundary, or how far the hard macro clusters are from boundaries. Note that mixed macro clusters are not pushed, thus not considered in this cost. The allowed values are floats, and the default value is 50.0.

-notch_weight

Weight for the notch, or the existence of dead space that cannot be used for placement & routing. Note that this cost applies only to hard macro clusters. The allowed values are floats, and the default value is 10.0.

-soft_blockage_weight

Weight for the penalty based on overlap between clusters with macros and areas of virtual blockages generated by the macro placer. The idea is to prevent macros from occupying certain areas: currently we may generate these blockages to protect the surroundings of areas reserved for IO pins. The allowed values are floats, and the default value is 10.0.

Place Macro#

Command for manual placement of a single macro.

place_macro
    -macro_name macro_name
    -location {x y}
    [-orientation orientation]
    [-exact]
    [-allow_overlap]

Options#

Switch Name

Description

-macro_name

The name of a macro of the design.

-location

The lower left corner of the macro in microns.

-orientation

The orientation according to odb. If nothing is specified, defaults to R0. We only allow R0, MY, MX and R180.

-exact

Enforce the exact -location. Note that the default behavior of place_macro is to snap the macro, that is, tune the entered -location so that the signal pins get aligned with the track-grid.

-allow_overlap

Allow the macro to be placed even if it overlaps with other macros. Note that the default behavior is to only place the macro if no overlap with other macros is found.

Set Macro Guidance Region#

Command for setting guidance regions for macros. The guidance region can have any size as long it fits inside the core area, as the placer will try to maximize the overlap region between macro and guidance region.

set_macro_guidance_region
    -macro_name macro_name
    -region region

Options#

Switch Name

Description

-macro_name

The name of a macro of the design.

-region

The lower left corner and upper right corner {lx ly ux uy} of the region in microns.

Set Macro Base Halo#

Command for setting the base halo around all macros. Per-macro halos set with set_macro_halo take precedence.

set_macro_base_halo left bottom right top
set_macro_base_halo width height

Arguments#

The left, bottom, right and top halo, or the width (sets both left and right) and height (sets both bottom and top), in microns.

Set Macro Halo#

Command for setting a halo for specific macros. If unset, the macro will use the default halo.

set_macro_halo
    -macro_name macro_name
    -halo {left bottom right top | width height}

Options#

Switch Name

Description

-macro_name

The name of a macro of the design.

-halo

The left, bottom, right and top halo or the width (sets both left and right) and height (sets both bottom and top), in microns. Consider the macro orientation as R0 when setting the halo.

Block Macro Channels#

Creates soft placement blockages around all fixed macros in the design, based on their halos. Macros with soft DEF halos are skipped, as other placement-aware tools already honor them.

For each macro, the halo used is resolved by this priority:

  1. The per-macro halo set with set_macro_halo, if defined.

  2. The DEF halo, floored by the base halo set with set_macro_base_halo.

  3. The base halo.

block_macro_channels

Example scripts#

Example of a script demonstrating how to run mpl on a sample design of bp_fe_top as follows:

./test/bp_fe_top.tcl

Regression tests#

There are a set of regression tests in ./test. For more information, refer to this section.

Simply run the following script:

./test/regression

Limitations#

References#

  1. A. B. Kahng, R. Varadarajan and Z. Wang, “RTL-MP: Toward Practical, Human-Quality Chip Planning and Macro Placement”, (.pdf), Proc. ACM/IEEE Intl. Symp. on Physical Design, 2022, pp. 3-11.

  2. A. B. Kahng, R. Varadarajan and Z. Wang, “Hier-RTLMP: A hierarchical automatic macro placer for large-scale complex IP blocks.”, (.pdf), arXiv preprint arXiv:2304.11761, 2023.

FAQs#

Check out GitHub discussion about this tool.

License#

BSD 3-Clause License. See LICENSE file.