Soft blockage support for detailed placement.#9080
Open
sakundu wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Open
Soft blockage support for detailed placement.#9080sakundu wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
sakundu wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: Sayak Kundu <sakundu@ucsd.edu>
Signed-off-by: Sayak Kundu <sakundu@ucsd.edu>
osamahammad21
requested changes
Jan 4, 2026
Comment on lines
+502
to
+512
| // Fallback: detect buffers/inverters/tie cells by master name pattern when STA not available | ||
| // Common naming conventions: BUF_*, INV_*, CLKBUF_*, CLKINV_*, TIE*, etc. | ||
| std::string master_name = master->getName(); | ||
| // Convert to uppercase for case-insensitive matching | ||
| std::transform( | ||
| master_name.begin(), master_name.end(), master_name.begin(), ::toupper); | ||
| if (master_name.find("BUF") != std::string::npos | ||
| || master_name.find("INV") != std::string::npos | ||
| || master_name.find("TIE") != std::string::npos) { | ||
| return true; | ||
| } |
Member
There was a problem hiding this comment.
This fallback feels quite hacky. Is there a reason for STA not being available?
Comment on lines
+440
to
+442
| if (cell == nullptr) { | ||
| return true; // No cell = no violation | ||
| } |
Member
There was a problem hiding this comment.
should be an error, but to be consistent with the rest of PlacementDRC, just remove.
| std::string master_name = master->getName(); | ||
| // Convert to uppercase for case-insensitive matching | ||
| std::transform( | ||
| master_name.begin(), master_name.end(), master_name.begin(), ::toupper); |
Contributor
There was a problem hiding this comment.
warning: no header providing "toupper" is directly included [misc-include-cleaner]
src/dpl/src/PlacementDRC.cpp:3:
- #include <cstddef>
+ #include <cctype>
+ #include <cstddef>| std::string master_name = master->getName(); | ||
| // Convert to uppercase for case-insensitive matching | ||
| std::transform( | ||
| master_name.begin(), master_name.end(), master_name.begin(), ::toupper); |
Contributor
There was a problem hiding this comment.
warning: use a ranges version of this algorithm [modernize-use-ranges]
Suggested change
| master_name.begin(), master_name.end(), master_name.begin(), ::toupper); | |
| std::ranges::transform( | |
| master_name,, master_name.begin(), ::toupper); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi OpenROAD team,
We have implemented soft blockage support in the detailed placement (DPL) module for our ISPD26 gate sizing and buffering contest. Soft blockages define regions where only specific cell types are permitted, such as buffers, inverters, tie cells, and physical cells, while regular logic cells are disallowed. We would appreciate it if you could review our code. Since soft blockage support is required for our contest, it would be great if this functionality could be made available in OpenROAD.
Thanks,
Sayak
Below is a brief description of the PR:
Motivation
For the ISPD'26 gate sizing and buffering contest, we use soft blockages to define regions where only buffers, inverters, tie cells, physical cells) should be placed, while preventing combinational and sequential logic cells from being placed in those regions.
Problem
Current DPL completely ignores soft blockages:
This implies that soft blockage constraints were not enforced during
detailed_placementorcheck_placement. To ensure that contest participants receive legal detailed placement solutions and that their results are evaluated correctly, DPL must properly honor soft blockages.Solution
This PR adds soft blockage support to DPL by:
is_soft_blockedcheckSoftBlockage()to validate cell placement against soft blockage rulesChanges
is_soft_blockedflag to Pixel structure and modifiedmarkBlocked()to handle soft blockages separately from hard blockagescheckSoftBlockage()andisAllowedInSoftBlockage()methods to validate cell placement against soft blockage rulesFiles Modified
src/dpl/CMakeLists.txt- Added dbSta_lib dependencysrc/dpl/include/dpl/Opendp.h- Added STA pointer for buffer/inverter detectionsrc/dpl/src/CheckPlacement.cpp- Added soft blockage violation trackingsrc/dpl/src/Opendp.cpp- Updated saveFailures call signaturesrc/dpl/src/PlacementDRC.cpp- Implemented soft blockage checking logicsrc/dpl/src/PlacementDRC.h- Added soft blockage method declarationssrc/dpl/src/dbToOpendp.cpp- Pass STA to PlacementDRCsrc/dpl/src/infrastructure/Grid.cpp- Mark soft blocked pixelssrc/dpl/src/infrastructure/Grid.h- Added is_soft_blocked to Pixelsrc/odb/src/swig/tcl/dbtypes.i- Added uint8_t typemapTest