Skip to content

Commit dc3713b

Browse files
committed
dpl: Handling filler name conflicts
Signed-off-by: LucasYuki <[email protected]>
1 parent 88a8f4c commit dc3713b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/dpl/src/FillerPlacement.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,27 @@ void Opendp::placeRowFillers(GridY row,
223223
/* physical_only */ true);
224224
DbuX x{core_.xMin() + gridToDbu(k, site_width)};
225225
DbuY y{core_.yMin() + grid_->gridYToDbu(row)};
226+
227+
// Handling name conflicts
228+
int tries = 0;
229+
const int MAX_TRIES = 1000;
230+
while (!inst && (tries < MAX_TRIES)) {
231+
inst = odb::dbInst::create(
232+
block_,
233+
master,
234+
(inst_name + "__" + to_string(tries++)).c_str(),
235+
/* physical_only */ true);
236+
}
237+
if (!inst) {
238+
logger_->error(DPL,
239+
5,
240+
"could not create the filler cell {} {} {} {}",
241+
gap,
242+
x,
243+
y,
244+
gridInstName(row, j - 1),
245+
gridInstName(row, k + 1));
246+
}
226247
inst->setOrient(orient);
227248
inst->setLocation(x.v, y.v);
228249
inst->setPlacementStatus(dbPlacementStatus::PLACED);

0 commit comments

Comments
 (0)