Skip to content

Commit fecb042

Browse files
authored
Merge pull request #9106 from gadfort/pdn-fix-array
pdn: fix getAdjacentCuts use and computing of arrays
2 parents 7b870fd + 12d1cf3 commit fecb042

File tree

2 files changed

+201
-1159
lines changed

2 files changed

+201
-1159
lines changed

src/pdn/src/via.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,7 +1787,7 @@ bool ViaGenerator::updateCutSpacing(int rows, int cols)
17871787
continue;
17881788
}
17891789

1790-
if (rule->getNumCuts() <= adj_cuts) {
1790+
if (rule->getAdjacentCuts() <= adj_cuts) {
17911791
if (max_dim == rows) {
17921792
cut_pitch_y_ = cut.dy() + rule->getCutSpacing();
17931793
changed = true;
@@ -1950,8 +1950,9 @@ void ViaGenerator::determineRowsAndColumns(
19501950

19511951
bool used_array = false;
19521952

1953-
const int array_size = std::max(rows, cols);
1954-
if (array_size >= 2) {
1953+
const int array_size_max = std::max(rows, cols);
1954+
const int array_size_min = std::min(rows, cols);
1955+
if (array_size_max >= 2) {
19551956
// if array rules might apply
19561957
const int array_area_x
19571958
= width
@@ -1972,8 +1973,9 @@ void ViaGenerator::determineRowsAndColumns(
19721973

19731974
for (const auto& [rule_cuts, rule_spacing] :
19741975
rule->getCutsArraySpacing()) {
1975-
if (rule_cuts > array_size) {
1976-
// this rule is ignored due to cuts
1976+
if (rule_cuts > array_size_min + (rule->isLongArray() ? 1 : 0)) {
1977+
// this rules does not apply because the smaller dimension of the
1978+
// array is less than the rule
19771979
continue;
19781980
}
19791981

0 commit comments

Comments
 (0)