Skip to content

Commit ed062c4

Browse files
committed
Merge branch 'master' into rsz_max_iters
2 parents ddf8b2d + 30edbc8 commit ed062c4

2 files changed

Lines changed: 28 additions & 11 deletions

File tree

src/dbSta/src/dbNetwork.cc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,17 +3210,18 @@ PortDirection* dbNetwork::dbToSta(const dbSigType& sig_type,
32103210
if (sig_type == dbSigType::GROUND) {
32113211
return PortDirection::ground();
32123212
}
3213-
if (io_type == dbIoType::INPUT) {
3214-
return PortDirection::input();
3215-
}
3216-
if (io_type == dbIoType::OUTPUT) {
3217-
return PortDirection::output();
3218-
}
3219-
if (io_type == dbIoType::INOUT) {
3220-
return PortDirection::bidirect();
3221-
}
3222-
if (io_type == dbIoType::FEEDTHRU) {
3223-
return PortDirection::bidirect();
3213+
switch (io_type.getValue()) {
3214+
case dbIoType::INPUT:
3215+
return PortDirection::input();
3216+
3217+
case dbIoType::OUTPUT:
3218+
return PortDirection::output();
3219+
3220+
case dbIoType::INOUT:
3221+
return PortDirection::bidirect();
3222+
3223+
case dbIoType::FEEDTHRU:
3224+
return PortDirection::bidirect();
32243225
}
32253226
logger_->critical(ORD, 2008, "unknown master term type");
32263227
return PortDirection::bidirect();

src/grt/src/GlobalRouter.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1879,6 +1879,14 @@ void GlobalRouter::addResourcesForPinAccess()
18791879
const bool north_pin = pin.getEdge() == PinEdge::north;
18801880
const int pin_y1 = north_pin ? pin_y : pin_y - 1;
18811881
const int pin_y2 = north_pin ? pin_y + 1 : pin_y;
1882+
1883+
// Ensure we do not go out of bounds when the pin is at the edge of
1884+
// the grid. If the pin is on the south edge and at y=0, there is no
1885+
// room for adding resources.
1886+
if (pin_y1 < 0) {
1887+
continue;
1888+
}
1889+
18821890
const int edge_cap = fastroute_->getEdgeCapacity(
18831891
pin_x, pin_y1, pin_x, pin_y2, layer);
18841892
fastroute_->addAdjustment(
@@ -1887,6 +1895,14 @@ void GlobalRouter::addResourcesForPinAccess()
18871895
const bool east_pin = pin.getEdge() == PinEdge::east;
18881896
const int pin_x1 = east_pin ? pin_x : pin_x - 1;
18891897
const int pin_x2 = east_pin ? pin_x + 1 : pin_x;
1898+
1899+
// Ensure we do not go out of bounds when the pin is at the edge of
1900+
// the grid. If the pin is on the west edge and at x=0, there is no
1901+
// room for adding resources.
1902+
if (pin_x1 < 0) {
1903+
continue;
1904+
}
1905+
18901906
const int edge_cap = fastroute_->getEdgeCapacity(
18911907
pin_x1, pin_y, pin_x2, pin_y, layer);
18921908
fastroute_->addAdjustment(

0 commit comments

Comments
 (0)