Skip to content

Commit e3cab82

Browse files
committed
ppl: use pin center during write_pin_placement
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
1 parent 00a077d commit e3cab82

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/ppl/src/IOPlacer.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,9 @@ void IOPlacer::writePinPlacement(const char* file_name, const bool placed)
530530
if (io_pin.getEdge() == edge) {
531531
const int layer = io_pin.getLayer();
532532
odb::dbTechLayer* tech_layer = getTech()->findRoutingLayer(layer);
533-
const odb::Point& pos = io_pin.getPosition();
533+
const odb::Rect pin_rect{io_pin.getLowerBound(),
534+
io_pin.getUpperBound()};
535+
const odb::Point pos = pin_rect.center();
534536
out << "place_pin -pin_name " << io_pin.getName() << " -layer "
535537
<< tech_layer->getName() << " -location {"
536538
<< getBlock()->dbuToMicrons(pos.x()) << " "
@@ -3253,6 +3255,13 @@ void IOPlacer::commitIOPinToDB(const IOPin& pin)
32533255
Point lower_bound = pin.getLowerBound();
32543256
Point upper_bound = pin.getUpperBound();
32553257

3258+
if (!netlist_->getIOPins().empty()) {
3259+
const int netlist_pin_idx = netlist_->getIoPinIdx(pin.getBTerm());
3260+
IOPin& netlist_pin = netlist_->getIoPin(netlist_pin_idx);
3261+
netlist_pin.setLowerBound(lower_bound.getX(), lower_bound.getY());
3262+
netlist_pin.setUpperBound(upper_bound.getX(), upper_bound.getY());
3263+
}
3264+
32563265
odb::dbBPin* bpin = odb::dbBPin::create(bterm);
32573266

32583267
int x_min = lower_bound.x();

0 commit comments

Comments
 (0)