Skip to content

Commit 5c19450

Browse files
authored
Merge pull request #8815 from gadfort/pdn-cut_spacing
pdn: check getTechLayerCutSpacingRules for adjacenct cuts
2 parents 13f7b43 + 146640a commit 5c19450

File tree

1 file changed

+34
-11
lines changed

1 file changed

+34
-11
lines changed

src/pdn/src/via.cpp

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,21 +1777,44 @@ bool ViaGenerator::updateCutSpacing(int rows, int cols)
17771777

17781778
bool changed = false;
17791779
const odb::Rect cut = getCut();
1780-
for (auto* rule : layer->getV54SpacingRules()) {
1781-
uint numcuts;
1782-
uint within;
1783-
uint spacing;
1784-
bool except_same_pgnet;
1785-
if (!rule->getAdjacentCuts(numcuts, within, spacing, except_same_pgnet)) {
1780+
for (auto* rule : layer->getTechLayerCutSpacingRules()) {
1781+
if (rule->getType()
1782+
!= odb::dbTechLayerCutSpacingRule::CutSpacingType::ADJACENTCUTS) {
17861783
continue;
17871784
}
1788-
if (except_same_pgnet) {
1785+
1786+
if (!rule->isCutClassToAll() && rule->getCutClass() != cutclass_) {
17891787
continue;
17901788
}
1791-
if (numcuts <= adj_cuts) {
1792-
cut_pitch_x_ = cut.dx() + spacing;
1793-
cut_pitch_y_ = cut.dy() + spacing;
1794-
changed = true;
1789+
1790+
if (rule->getNumCuts() <= adj_cuts) {
1791+
if (max_dim == rows) {
1792+
cut_pitch_y_ = cut.dy() + rule->getCutSpacing();
1793+
changed = true;
1794+
} else {
1795+
cut_pitch_x_ = cut.dx() + rule->getCutSpacing();
1796+
changed = true;
1797+
}
1798+
}
1799+
}
1800+
1801+
if (!changed) {
1802+
for (auto* rule : layer->getV54SpacingRules()) {
1803+
uint numcuts;
1804+
uint within;
1805+
uint spacing;
1806+
bool except_same_pgnet;
1807+
if (!rule->getAdjacentCuts(numcuts, within, spacing, except_same_pgnet)) {
1808+
continue;
1809+
}
1810+
if (except_same_pgnet) {
1811+
continue;
1812+
}
1813+
if (numcuts <= adj_cuts) {
1814+
cut_pitch_x_ = cut.dx() + spacing;
1815+
cut_pitch_y_ = cut.dy() + spacing;
1816+
changed = true;
1817+
}
17951818
}
17961819
}
17971820

0 commit comments

Comments
 (0)