|
3 | 3 |
|
4 | 4 | #include "PadPlacer.h" |
5 | 5 |
|
| 6 | +#include <algorithm> |
| 7 | +#include <cmath> |
| 8 | +#include <cstdint> |
| 9 | +#include <iterator> |
| 10 | +#include <limits> |
| 11 | +#include <map> |
| 12 | +#include <optional> |
| 13 | +#include <set> |
| 14 | +#include <utility> |
| 15 | +#include <vector> |
| 16 | + |
6 | 17 | #include "gui/gui.h" |
7 | 18 | #include "odb/db.h" |
8 | 19 | #include "odb/dbTransform.h" |
| 20 | +#include "odb/dbTypes.h" |
9 | 21 | #include "odb/geom.h" |
| 22 | +#include "odb/isotropy.h" |
| 23 | +#include "utl/Logger.h" |
10 | 24 |
|
11 | 25 | namespace pad { |
12 | 26 |
|
@@ -522,7 +536,7 @@ void BumpAlignedPadPlacer::place() |
522 | 536 | } |
523 | 537 |
|
524 | 538 | // build positions with bump as the center |
525 | | - int target_offset = group_center - group_width / 2; |
| 539 | + int target_offset = group_center - (group_width / 2); |
526 | 540 | for (const auto& [ginst, giterm] : min_terms) { |
527 | 541 | inst_pos[ginst] = target_offset; |
528 | 542 | target_offset += getInstWidths().at(ginst); |
@@ -582,11 +596,11 @@ int64_t BumpAlignedPadPlacer::computePadBumpDistance(odb::dbInst* inst, |
582 | 596 | case odb::Direction2D::North: |
583 | 597 | case odb::Direction2D::South: |
584 | 598 | return odb::Point::squaredDistance( |
585 | | - odb::Point(center_pos + inst_width / 2, row_center.y()), center); |
| 599 | + odb::Point(center_pos + (inst_width / 2), row_center.y()), center); |
586 | 600 | case odb::Direction2D::West: |
587 | 601 | case odb::Direction2D::East: |
588 | 602 | return odb::Point::squaredDistance( |
589 | | - odb::Point(row_center.x(), center_pos + inst_width / 2), center); |
| 603 | + odb::Point(row_center.x(), center_pos + (inst_width / 2)), center); |
590 | 604 | } |
591 | 605 |
|
592 | 606 | return std::numeric_limits<int64_t>::max(); |
|
0 commit comments