Skip to content

Commit 5203498

Browse files
committed
pdn: correct adj cuts and use min dim for array size identification
Signed-off-by: Peter Gadfort <[email protected]>
1 parent f745f67 commit 5203498

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
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 array is
1978+
// less than the rule
19771979
continue;
19781980
}
19791981

0 commit comments

Comments
 (0)