-
Notifications
You must be signed in to change notification settings - Fork 741
drt: incremental PA trial #8918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
osamahammad21
merged 49 commits into
The-OpenROAD-Project:master
from
The-OpenROAD-Project-staging:drt-incremental-pa
Dec 2, 2025
+1,692
−1,526
Merged
Changes from all commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
a1aadb0
drt: incremental PA trial
osamahammad21 066fa1b
drt: fix incremental pin access
osamahammad21 17c073c
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 8e61400
grt: update pin access at each incremental groute update
eder-matheus adc87a7
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 1e48b11
merge changes needed
osamahammad21 b8326c7
drt: update db access points when needed only
osamahammad21 4dcd0b6
drt: fix updates
osamahammad21 208c3ed
drt: fix wrong parallelization for unique inst init
osamahammad21 c94efe1
drt: fixes
osamahammad21 3f97889
drt: fix missing setPinAccessIdx
osamahammad21 8fd38ab
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 a749b35
in progress
osamahammad21 0127d98
fixes
osamahammad21 11670e1
drt: bug fixes
osamahammad21 9d33904
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 4c03005
drt: remove unneeded test case
osamahammad21 c8fc014
drt: cleanup
osamahammad21 38f8699
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 6f3e96b
drt: testing error guides again
osamahammad21 dee4e27
drt: handle missing instances in the insts_set_
osamahammad21 b37e271
drt: fixes
osamahammad21 57c5d25
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 a7fd2c1
drt: fixes to incremental pa
osamahammad21 f443865
drt: fix dbBlock::getGCellIndices
osamahammad21 7427cbe
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 f7bfa6c
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 e95052c
Merge branch 'master' of https://github.com/The-OpenROAD-Project/Open…
eder-matheus bc0d3cf
Merge branch 'master' into drt-incremental-pa
eder-matheus 9279035
grt: fix check for node connection with edge
eder-matheus d6083e8
grt: update ok files
eder-matheus 33a0582
drt: update guide files for ndr_vias tests
eder-matheus 0030275
Revert "grt: update ok files"
eder-matheus 3730404
Revert "grt: fix check for node connection with edge"
eder-matheus 7e9f000
grt: ensure pin coverage by adding extra vias for nodes not covered
eder-matheus 1c3f6b5
Merge branch 'master' of https://github.com/The-OpenROAD-Project-priv…
eder-matheus 26fc54d
grt: run ensurePinCoverage after fastroute flow is complete
eder-matheus efb7aa8
Merge branch 'drt-data-race' into drt-incremental-pa
osamahammad21 f20733e
drt: fix non-determinstic bug
osamahammad21 1954f9b
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 5b739f1
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 db27130
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 3148978
Merge branch 'master' into drt-incremental-pa
eder-matheus ef7b34b
Merge branch 'master' of https://github.com/The-OpenROAD-Project/Open…
eder-matheus 1fb1617
drt/grt: clang tidy and format
eder-matheus 8f5c6fb
test: update metrics limits
eder-matheus 1eb991d
drt: clang-tidy
eder-matheus 4b3709e
Merge remote-tracking branch 'origin/master' into drt-incremental-pa
osamahammad21 dd122d3
drt: remove testing error to allow ispd ci
osamahammad21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |||||||
| #include <algorithm> | ||||||||
| #include <map> | ||||||||
| #include <memory> | ||||||||
| #include <set> | ||||||||
| #include <string> | ||||||||
| #include <type_traits> | ||||||||
| #include <utility> | ||||||||
|
|
@@ -270,6 +271,39 @@ class frBlock : public frBlockObject | |||||||
| } | ||||||||
| return odb::Point(idxX, idxY); | ||||||||
| } | ||||||||
|
|
||||||||
| std::vector<odb::Point> getGCellIndices(const odb::Point& pt) const | ||||||||
| { | ||||||||
| const auto& gp = getGCellPatterns(); | ||||||||
| const auto& xgp = gp[0]; | ||||||||
| const auto& ygp = gp[1]; | ||||||||
| frCoord coord_x = pt.x() - xgp.getStartCoord(); | ||||||||
| frCoord coord_y = pt.y() - ygp.getStartCoord(); | ||||||||
| const frCoord max_coord_x = xgp.getSpacing() * (frCoord) xgp.getCount(); | ||||||||
| const frCoord max_coord_y = ygp.getSpacing() * (frCoord) ygp.getCount(); | ||||||||
| coord_x = std::clamp(coord_x, 0, max_coord_x - 1); | ||||||||
| coord_y = std::clamp(coord_y, 0, max_coord_y - 1); | ||||||||
|
|
||||||||
| const frCoord base_idxX = coord_x / (frCoord) xgp.getSpacing(); | ||||||||
| const frCoord base_idxY = coord_y / (frCoord) ygp.getSpacing(); | ||||||||
| std::set<frCoord> x_indices{base_idxX}; | ||||||||
| std::set<frCoord> y_indices{base_idxY}; | ||||||||
| // TODO: handle case where gcell size is 1 unit | ||||||||
| if (coord_x % xgp.getSpacing() == 0 && base_idxX != 0) { | ||||||||
| x_indices.insert(base_idxX - 1); | ||||||||
| } | ||||||||
| if (coord_y % ygp.getSpacing() == 0 && base_idxY != 0) { | ||||||||
| y_indices.insert(base_idxY - 1); | ||||||||
| } | ||||||||
| std::vector<odb::Point> sol; | ||||||||
| for (auto& x : x_indices) { | ||||||||
| for (auto& y : y_indices) { | ||||||||
| sol.emplace_back(x, y); | ||||||||
| } | ||||||||
| } | ||||||||
| return sol; | ||||||||
| } | ||||||||
|
|
||||||||
| bool isValidGCellIdx(const odb::Point& pt) const | ||||||||
| { | ||||||||
| const auto& gp = getGCellPatterns(); | ||||||||
|
|
@@ -319,18 +353,41 @@ class frBlock : public frBlockObject | |||||||
| name2inst_.erase(inst->getName()); | ||||||||
| inst->setToBeDeleted(true); | ||||||||
| } | ||||||||
| void removeDeletedInsts() | ||||||||
|
|
||||||||
| void removeNet(frNet* net) | ||||||||
| { | ||||||||
| name2net_.erase(net->getName()); | ||||||||
| for (auto term : net->getInstTerms()) { | ||||||||
| term->addToNet(nullptr); | ||||||||
| } | ||||||||
| for (auto term : net->getBTerms()) { | ||||||||
| term->addToNet(nullptr); | ||||||||
| } | ||||||||
| net->setToBeDeleted(true); | ||||||||
| } | ||||||||
|
|
||||||||
| void removeDeletedObjects() | ||||||||
| { | ||||||||
| insts_.erase(std::remove_if(insts_.begin(), | ||||||||
| insts_.end(), | ||||||||
| [](const std::unique_ptr<frInst>& inst) { | ||||||||
| return inst->isToBeDeleted(); | ||||||||
| }), | ||||||||
| insts_.end()); | ||||||||
| nets_.erase(std::remove_if(nets_.begin(), | ||||||||
| nets_.end(), | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. warning: use a ranges version of this algorithm [modernize-use-ranges]
Suggested change
|
||||||||
| [](const std::unique_ptr<frNet>& net) { | ||||||||
| return net->toBeDeleted(); | ||||||||
| }), | ||||||||
| nets_.end()); | ||||||||
| int id = 0; | ||||||||
| for (const auto& inst : insts_) { | ||||||||
| inst->setId(id++); | ||||||||
| } | ||||||||
| id = 0; | ||||||||
| for (const auto& net : nets_) { | ||||||||
| net->setId(id++); | ||||||||
| } | ||||||||
| } | ||||||||
| void addNet(std::unique_ptr<frNet> in) | ||||||||
| { | ||||||||
|
|
||||||||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: no header providing "std::set" is directly included [misc-include-cleaner]
src/drt/src/db/obj/frBlock.h:8: