@@ -98,7 +98,7 @@ void InitialPlace::doBicgstabPlace(int threads)
9898 " {}" ,
9999 iter,
100100 error_max,
101- pbc_->hpwl ());
101+ pbc_->getHpwl ());
102102 updateCoordi ();
103103
104104 if (error_max <= 1e-5 && iter >= 5 ) {
@@ -114,8 +114,8 @@ void InitialPlace::doBicgstabPlace(int threads)
114114// starting point of initial place is center.
115115void InitialPlace::placeInstsCenter ()
116116{
117- const int center_x = pbc_->die ().coreCx ();
118- const int center_y = pbc_->die ().coreCy ();
117+ const int center_x = pbc_->getDie ().coreCx ();
118+ const int center_y = pbc_->getDie ().coreCy ();
119119
120120 int count_region_center = 0 ;
121121 int count_db_location = 0 ;
@@ -146,7 +146,7 @@ void InitialPlace::placeInstsCenter()
146146 inst->setCenterLocation (domain_x_max - (domain_x_max - domain_x_min) / 2 ,
147147 domain_y_max - (domain_y_max - domain_y_min) / 2 );
148148 ++count_region_center;
149- } else if (pbc_->skipIoMode () && db_inst->isPlaced ()) {
149+ } else if (pbc_->isSkipIoMode () && db_inst->isPlaced ()) {
150150 // It is helpful to pick up the placement from mpl if available,
151151 // particularly when you are going to run skip_io.
152152 const auto bbox = db_inst->getBBox ()->getBox ();
@@ -172,7 +172,7 @@ void InitialPlace::placeInstsCenter()
172172void InitialPlace::setPlaceInstExtId ()
173173{
174174 // reset ExtId for all instances
175- for (auto & inst : pbc_->insts ()) {
175+ for (auto & inst : pbc_->getInsts ()) {
176176 inst->setExtId (INT_MAX);
177177 }
178178 // set index only with place-able instances
@@ -184,21 +184,21 @@ void InitialPlace::setPlaceInstExtId()
184184void InitialPlace::updatePinInfo ()
185185{
186186 // reset all MinMax attributes
187- for (auto & pin : pbc_->pins ()) {
187+ for (auto & pin : pbc_->getPins ()) {
188188 pin->unsetMinPinX ();
189189 pin->unsetMinPinY ();
190190 pin->unsetMaxPinX ();
191191 pin->unsetMaxPinY ();
192192 }
193193
194- for (auto & net : pbc_->nets ()) {
194+ for (auto & net : pbc_->getNets ()) {
195195 Pin *pinMinX = nullptr , *pinMinY = nullptr ;
196196 Pin *pinMaxX = nullptr , *pinMaxY = nullptr ;
197197 int lx = INT_MAX, ly = INT_MAX;
198198 int ux = INT_MIN, uy = INT_MIN;
199199
200200 // Mark B2B info on Pin structures
201- for (auto & pin : net->pins ()) {
201+ for (auto & pin : net->getPins ()) {
202202 if (lx > pin->cx ()) {
203203 if (pinMinX) {
204204 pinMinX->unsetMinPinX ();
@@ -267,7 +267,7 @@ void InitialPlace::createSparseMatrix()
267267
268268 // initialize vector
269269 for (auto & inst : pbc_->placeInsts ()) {
270- int idx = inst->extId ();
270+ int idx = inst->getExtId ();
271271
272272 instLocVecX_ (idx) = inst->cx ();
273273 instLocVecY_ (idx) = inst->cy ();
@@ -276,29 +276,29 @@ void InitialPlace::createSparseMatrix()
276276 }
277277
278278 // for each net
279- for (auto & net : pbc_->nets ()) {
279+ for (auto & net : pbc_->getNets ()) {
280280 // skip for small nets.
281- if (net->pins ().size () <= 1 ) {
281+ if (net->getPins ().size () <= 1 ) {
282282 continue ;
283283 }
284284
285285 // escape long time cals on huge fanout.
286286 //
287- if (net->pins ().size () >= ipVars_.maxFanout ) {
287+ if (net->getPins ().size () >= ipVars_.maxFanout ) {
288288 continue ;
289289 }
290290
291- float netWeight = ipVars_.netWeightScale / (net->pins ().size () - 1 );
291+ float netWeight = ipVars_.netWeightScale / (net->getPins ().size () - 1 );
292292
293293 // foreach two pins in single nets.
294- auto & pins = net->pins ();
294+ auto & pins = net->getPins ();
295295 for (int pinIdx1 = 1 ; pinIdx1 < pins.size (); ++pinIdx1) {
296296 Pin* pin1 = pins[pinIdx1];
297297 for (int pinIdx2 = 0 ; pinIdx2 < pinIdx1; ++pinIdx2) {
298298 Pin* pin2 = pins[pinIdx2];
299299
300300 // no need to fill in when instance is same
301- if (pin1->instance () == pin2->instance ()) {
301+ if (pin1->getInstance () == pin2->getInstance ()) {
302302 continue ;
303303 }
304304
@@ -315,8 +315,8 @@ void InitialPlace::createSparseMatrix()
315315
316316 // both pin cames from instance
317317 if (pin1->isPlaceInstConnected () && pin2->isPlaceInstConnected ()) {
318- const int inst1 = pin1->instance ()->extId ();
319- const int inst2 = pin2->instance ()->extId ();
318+ const int inst1 = pin1->getInstance ()->getExtId ();
319+ const int inst2 = pin2->getInstance ()->getExtId ();
320320
321321 listX.emplace_back (inst1, inst1, weightX);
322322 listX.emplace_back (inst2, inst2, weightX);
@@ -326,33 +326,33 @@ void InitialPlace::createSparseMatrix()
326326
327327 fixedInstForceVecX_ (inst1)
328328 += -weightX
329- * ((pin1->cx () - pin1->instance ()->cx ())
330- - (pin2->cx () - pin2->instance ()->cx ()));
329+ * ((pin1->cx () - pin1->getInstance ()->cx ())
330+ - (pin2->cx () - pin2->getInstance ()->cx ()));
331331
332332 fixedInstForceVecX_ (inst2)
333333 += -weightX
334- * ((pin2->cx () - pin2->instance ()->cx ())
335- - (pin1->cx () - pin1->instance ()->cx ()));
334+ * ((pin2->cx () - pin2->getInstance ()->cx ())
335+ - (pin1->cx () - pin1->getInstance ()->cx ()));
336336 }
337337 // pin1 from IO port / pin2 from Instance
338338 else if (!pin1->isPlaceInstConnected ()
339339 && pin2->isPlaceInstConnected ()) {
340- const int inst2 = pin2->instance ()->extId ();
340+ const int inst2 = pin2->getInstance ()->getExtId ();
341341 listX.emplace_back (inst2, inst2, weightX);
342342
343343 fixedInstForceVecX_ (inst2)
344344 += weightX
345- * (pin1->cx () - (pin2->cx () - pin2->instance ()->cx ()));
345+ * (pin1->cx () - (pin2->cx () - pin2->getInstance ()->cx ()));
346346 }
347347 // pin1 from Instance / pin2 from IO port
348348 else if (pin1->isPlaceInstConnected ()
349349 && !pin2->isPlaceInstConnected ()) {
350- const int inst1 = pin1->instance ()->extId ();
350+ const int inst1 = pin1->getInstance ()->getExtId ();
351351 listX.emplace_back (inst1, inst1, weightX);
352352
353353 fixedInstForceVecX_ (inst1)
354354 += weightX
355- * (pin2->cx () - (pin1->cx () - pin1->instance ()->cx ()));
355+ * (pin2->cx () - (pin1->cx () - pin1->getInstance ()->cx ()));
356356 }
357357 }
358358
@@ -369,8 +369,8 @@ void InitialPlace::createSparseMatrix()
369369
370370 // both pin cames from instance
371371 if (pin1->isPlaceInstConnected () && pin2->isPlaceInstConnected ()) {
372- const int inst1 = pin1->instance ()->extId ();
373- const int inst2 = pin2->instance ()->extId ();
372+ const int inst1 = pin1->getInstance ()->getExtId ();
373+ const int inst2 = pin2->getInstance ()->getExtId ();
374374
375375 listY.emplace_back (inst1, inst1, weightY);
376376 listY.emplace_back (inst2, inst2, weightY);
@@ -380,33 +380,33 @@ void InitialPlace::createSparseMatrix()
380380
381381 fixedInstForceVecY_ (inst1)
382382 += -weightY
383- * ((pin1->cy () - pin1->instance ()->cy ())
384- - (pin2->cy () - pin2->instance ()->cy ()));
383+ * ((pin1->cy () - pin1->getInstance ()->cy ())
384+ - (pin2->cy () - pin2->getInstance ()->cy ()));
385385
386386 fixedInstForceVecY_ (inst2)
387387 += -weightY
388- * ((pin2->cy () - pin2->instance ()->cy ())
389- - (pin1->cy () - pin1->instance ()->cy ()));
388+ * ((pin2->cy () - pin2->getInstance ()->cy ())
389+ - (pin1->cy () - pin1->getInstance ()->cy ()));
390390 }
391391 // pin1 from IO port / pin2 from Instance
392392 else if (!pin1->isPlaceInstConnected ()
393393 && pin2->isPlaceInstConnected ()) {
394- const int inst2 = pin2->instance ()->extId ();
394+ const int inst2 = pin2->getInstance ()->getExtId ();
395395 listY.emplace_back (inst2, inst2, weightY);
396396
397397 fixedInstForceVecY_ (inst2)
398398 += weightY
399- * (pin1->cy () - (pin2->cy () - pin2->instance ()->cy ()));
399+ * (pin1->cy () - (pin2->cy () - pin2->getInstance ()->cy ()));
400400 }
401401 // pin1 from Instance / pin2 from IO port
402402 else if (pin1->isPlaceInstConnected ()
403403 && !pin2->isPlaceInstConnected ()) {
404- const int inst1 = pin1->instance ()->extId ();
404+ const int inst1 = pin1->getInstance ()->getExtId ();
405405 listY.emplace_back (inst1, inst1, weightY);
406406
407407 fixedInstForceVecY_ (inst1)
408408 += weightY
409- * (pin2->cy () - (pin1->cy () - pin1->instance ()->cy ()));
409+ * (pin2->cy () - (pin1->cy () - pin1->getInstance ()->cy ()));
410410 }
411411 }
412412 }
@@ -420,7 +420,7 @@ void InitialPlace::createSparseMatrix()
420420void InitialPlace::updateCoordi ()
421421{
422422 for (auto & inst : pbc_->placeInsts ()) {
423- int idx = inst->extId ();
423+ int idx = inst->getExtId ();
424424 if (!inst->isLocked ()) {
425425 inst->dbSetCenterLocation (instLocVecX_ (idx), instLocVecY_ (idx));
426426 inst->dbSetPlaced ();
0 commit comments