Skip to content

Commit 6544ddd

Browse files
authored
Merge pull request #2719 from The-OpenROAD-Project-staging/mpl2-pin-loc
mpl2: handle pins which extend outside die area
2 parents cd56bc2 + 63f2205 commit 6544ddd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/mpl2/src/hier_rtlmp.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -689,19 +689,19 @@ void HierRTLMP::createBundledIOs()
689689
}
690690
// calculate cluster id based on the location of IO Pins / Pads
691691
int cluster_id = -1;
692-
if (lx == floorplan_lx_) {
692+
if (lx <= floorplan_lx_) {
693693
// The IO is on the left boundary
694694
cluster_id = cluster_id_base
695695
+ std::floor(((ly + uy) / 2.0 - floorplan_ly_) / y_base);
696-
} else if (uy == floorplan_uy_) {
696+
} else if (uy >= floorplan_uy_) {
697697
// The IO is on the top boundary
698698
cluster_id = cluster_id_base + num_bundled_IOs_
699699
+ std::floor(((lx + ux) / 2.0 - floorplan_lx_) / x_base);
700-
} else if (ux == floorplan_ux_) {
700+
} else if (ux >= floorplan_ux_) {
701701
// The IO is on the right boundary
702702
cluster_id = cluster_id_base + num_bundled_IOs_ * 2
703703
+ std::floor((floorplan_uy_ - (ly + uy) / 2.0) / y_base);
704-
} else if (ly == floorplan_ly_) {
704+
} else if (ly <= floorplan_ly_) {
705705
// The IO is on the bottom boundary
706706
cluster_id = cluster_id_base + num_bundled_IOs_ * 3
707707
+ std::floor((floorplan_ux_ - (lx + ux) / 2.0) / x_base);
@@ -710,7 +710,10 @@ void HierRTLMP::createBundledIOs()
710710
// Check if the IO pins / Pads exist
711711
if (cluster_id == -1) {
712712
logger_->error(
713-
MPL, 2024, "Floorplan has not been initialized? Pin location error.");
713+
MPL,
714+
2024,
715+
"Floorplan has not been initialized? Pin location error for {}.",
716+
term->getName());
714717
} else {
715718
odb::dbIntProperty::create(term, "cluster_id", cluster_id);
716719
}

0 commit comments

Comments
 (0)