Detailed Placement#
The detailed placement module in OpenROAD (dpl) is based on OpenDP, or
Open-Source Detailed Placement Engine. Its key features are:
Fence region support
Fragmented row support
Mixed-cell-height (1x–4x) legalization
Two placement engines selectable at runtime
Placement Engines#
Diamond Search#
The default engine performs a BFS-style diamond search from each cell’s global placement position, expanding outward in Manhattan order until a legal site is found.
NegotiationLegalizer#
An optional two-pass legalizer based on the NBLG paper. Enabled with
-use_negotiation on the detailed_placement command.
Global Placement result
│
▼
┌───────────────────┐
│ Abacus Pass │ Fast DP sweep, row-by-row.
│ (Skipped) │ Near-optimal for uncongested cells.
│ │ Mixed-cell-height via row assignment.
│ Handles: │ Power-rail alignment enforced.
│ - 1x/2x/3x/4x │ Fence violations → skipped (→ negotiation).
│ - Fence regions │
└────────┬──────────┘
│ illegal cells (overlap / fence violated)
▼
┌───────────────────┐
│ Negotiation Pass │ Iterative rip-up & replace (from NBLG paper).
│ │ Illegal cells + spatial neighbors compete for
│ NBLG components: │ grid resources. History cost penalises
│ - Adaptive pf │ persistent congestion. Isolation point skips
│ - Isolation pt │ already-legal cells in phase 2.
│ - History cost │
└────────┬──────────┘
│
▼
┌───────────────────┐
│ Post-optimisation │ Greedy displacement improvement (5 passes).
│ (Skipped) │ Cell swap via bipartite matching within groups.
│ │
└────────┬──────────┘
│
▼
Legal placement written back to OpenDB
Commands#
Note
Parameters in square brackets
[-param param]are optional.Parameters without square brackets
-param2 param2are required.
Detailed Placement#
The detailed_placement command performs detailed placement of instances
to legal locations after global placement.
detailed_placement
[-max_displacement disp|{disp_x disp_y}]
[-disallow_one_site_gaps]
[-report_file_name filename]
[-use_negotiation]
[-abacus]
Options#
Switch Name |
Description |
|---|---|
|
Max distance that an instance can be moved (in microns) when finding a site where it can be placed. Either set one value for both directions or set |
|
Option is deprecated. |
|
File name for saving the report to (e.g. |
|
By default DPL initiates with all instances unplaced. With this flag DPL will check for already legalized instances and set them as placed. |
|
File name for saving the report to (e.g. |
|
Use the NegotiationLegalizer instead of the default diamond search engine. |
|
Enable the Abacus pre-pass within the NegotiationLegalizer. Only effective when |
Set Placement Padding#
The set_placement_padding command sets left and right padding in multiples
of the row site width. Use the set_placement_padding command before
legalizing placement to leave room for routing. Use the -global flag
for padding that applies to all instances. Use -instances
for instance-specific padding. The instances insts can be a list of instance
names, or an instance object returned by the SDC get_cells command. To
specify padding for all instances of a common master, use the -filter
“ref_name == get_cells.
set_placement_padding
-global|-masters masters|-instances insts
[-right site_count]
[-left site_count]
Options#
Warning
Either one of these flags must be set: -global | -masters | -instances.
The order of preference is global > masters > instances
Switch Name |
Description |
|---|---|
|
Set padding globally using |
|
Set padding only for these masters using |
|
For |
|
Left padding (in site count). |
|
Right padding (in site count). |
|
Set padding for these list of instances. Not to be confused with the |
Filler Placement#
The filler_placement command fills gaps between detail-placed instances
to connect the power and ground rails in the rows. filler_masters is a
list of master/macro names to use for filling the gaps. Wildcard matching
is supported, so FILL* will match, e.g., FILLCELL_X1 FILLCELL_X16 FILLCELL_X2 FILLCELL_X32 FILLCELL_X4 FILLCELL_X8. To specify a different naming prefix
from FILLER_ use -prefix <new prefix>.
filler_placement
[-prefix prefix]
[-verbose]
filler_masters
Options#
Switch Name |
Description |
|---|---|
|
Prefix to name the filler cells. The default value is |
|
Print the filler cell usage. |
|
Filler master cells. |
Remove Fillers#
This command removes all filler cells.
remove_fillers
Check Placement#
The check_placement command checks the placement legality. It returns
0 if the placement is legal.
check_placement
[-verbose]
[-disallow_one_site_gaps]
[-report_file_name filename]
Options#
Switch Name |
Description |
|---|---|
|
Enable verbose logging. |
|
Option is deprecated. |
|
File name for saving the report to (e.g. |
Optimize Mirroring#
The optimize_mirroring command mirrors instances about the Y axis in
a weak attempt to reduce the total half-perimeter wirelength (HPWL).
optimize_mirroring
Improve Placement#
The improve_placement command optimizes a given placed design.
improve_placement
[-random_seed seed]
[-max_displacement disp|{disp_x disp_y}]
[-disallow_one_site_gaps]
Useful Developer Commands#
If you are a developer, you might find these useful. More details can be found in the source file or the swig file.
Command Name |
Description |
|---|---|
|
Debug detailed placement. |
|
Get masters from a design. |
|
Get bounding box of an instance. |
|
Get grid bounding box of an instance. |
|
Format grid (takes in length |
|
Get row site name. |
Example scripts#
Examples scripts demonstrating how to run dpl on a sample design of aes as follows:
./test/aes.tcl
Regression tests#
There are a set of regression tests in ./test. Refer to this section for more information.
Simply run the following script:
./test/regression
Limitations#
The following limitations apply when using the NegotiationLegalizer (-use_negotiation):
Abacus cluster chain: The current Abacus implementation uses a simplified cluster structure. A production version should maintain an explicit doubly-linked list of cells within each cluster, as in the original Spindler et al. paper.
Multithreading: The negotiation pass is single-threaded. Extend with the inter-region parallelism from NBLG (Algorithm 2, dynamic region adjustment) using OpenMP or std::thread.
Fence region R-tree: Replace linear scan in
FenceRegion::nearestRect()with a spatial index (Boost.Geometry rtree or OpenROAD’s existing RTree) for large designs with many fence sub-rectangles.Row rail inference: Currently uses row-index parity as a proxy for VDD/VSS. Replace with actual LEF pg_pin parsing once available in the build context.
FAQs#
Check out GitHub discussion about this tool.
References#
Do, S., Woo, M., & Kang, S. (2019, May). Fence-region-aware mixed-height standard cell legalization. In Proceedings of the 2019 on Great Lakes Symposium on VLSI (pp. 259-262). (.pdf)
P. Spindler et al., “Abacus: Fast legalization of standard cell circuits with minimal movement,” ISPD 2008.
J. Chen et al., “NBLG: A Robust Legalizer for Mixed-Cell-Height Modern Design,” IEEE TCAD, vol. 41, no. 11, 2022.
L. McMurchie and C. Ebeling, “PathFinder: A negotiation-based performance-driven router for FPGAs,” 1995.
License#
BSD 3-Clause License. See LICENSE file.