Skip to content

Commit 1e90686

Browse files
authored
Merge pull request #8635 from eder-matheus/grt_aps
grt: use all APs for non-core cells
2 parents 13c6ac1 + 81af9cf commit 1e90686

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/grt/src/GlobalRouter.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,8 +934,14 @@ bool GlobalRouter::findPinAccessPointPositions(
934934
access_points.insert(
935935
access_points.begin(), bpin_pas.begin(), bpin_pas.end());
936936
}
937-
} else {
937+
} else if (pin.isCorePin()) {
938938
access_points = pin.getITerm()->getPrefAccessPoints();
939+
} else {
940+
// For non-core cells, DRT does not assign preferred APs.
941+
// Use all APs to ensure the guides covering at least one AP.
942+
for (const auto& [pin, aps] : pin.getITerm()->getAccessPoints()) {
943+
access_points.insert(access_points.end(), aps.begin(), aps.end());
944+
}
939945
}
940946

941947
if (access_points.empty()) {

src/grt/src/Pin.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,15 @@ odb::Point Pin::getPositionNearInstEdge(const odb::Rect& pin_box,
185185
return pin_pos;
186186
}
187187

188+
bool Pin::isCorePin() const
189+
{
190+
if (iterm == nullptr) {
191+
return false;
192+
}
193+
194+
odb::dbInst* inst = iterm->getInst();
195+
return inst->isCore();
196+
;
197+
}
198+
188199
} // namespace grt

src/grt/src/Pin.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class Pin
6666
bool isDriver();
6767
odb::Point getPositionNearInstEdge(const odb::Rect& pin_box,
6868
const odb::Point& rect_middle) const;
69+
bool isCorePin() const;
6970

7071
private:
7172
void determineEdge(const odb::Rect& bounds,

0 commit comments

Comments
 (0)