Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/dpl/include/dpl/Opendp.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ class Opendp

// gap -> sequence of masters to fill the gap
using GapFillers = std::vector<dbMasterSeq>;
// row height -> GapFillers, by implant layer
using GapFillersByHeight = std::map<DbuY, GapFillers>;
// row site -> GapFillers
using GapFillersBySite = std::map<odb::dbSite*, GapFillers>;

using MasterByImplant = std::map<odb::dbTechLayer*, dbMasterSeq>;

Expand Down Expand Up @@ -319,7 +319,7 @@ class Opendp
void setGridCells();
dbMasterSeq& gapFillers(odb::dbTechLayer* implant,
GridX gap,
DbuY row_height,
odb::dbSite* site,
const MasterByImplant& filler_masters_by_implant);
void placeRowFillers(GridY row,
const std::string& prefix,
Expand Down Expand Up @@ -371,8 +371,8 @@ class Opendp
RtreeBox regions_rtree_;

// Filler placement.
// gap (in sites) -> seq of masters by implant and row height
std::map<odb::dbTechLayer*, GapFillersByHeight> gap_fillers_;
// gap (in sites) -> seq of masters by implant and site
std::map<odb::dbTechLayer*, GapFillersBySite> gap_fillers_;
std::map<odb::dbMaster*, int> filler_count_;
bool have_fillers_ = false;

Expand Down
12 changes: 6 additions & 6 deletions src/dpl/src/FillerPlacement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,8 @@ void Opendp::placeRowFillers(GridY row,
}

GridX gap = k - j;
const DbuY row_height{site->getHeight()};
dbMasterSeq& fillers
= gapFillers(implant, gap, row_height, filler_masters_by_implant);
= gapFillers(implant, gap, site, filler_masters_by_implant);
if (fillers.empty()) {
DbuX x{core_.xMin() + gridToDbu(j, site_width)};
DbuY y{core_.yMin() + grid_->gridYToDbu(row)};
Expand All @@ -204,7 +203,7 @@ void Opendp::placeRowFillers(GridY row,
"at ({:.2f}, {:.2f}) um between {} and {}",
gap,
block_->dbuToMicrons(gridToDbu(gap, site_width).v),
block_->dbuToMicrons(row_height.v),
block_->dbuToMicrons(site->getHeight()),
block_->dbuToMicrons(x.v),
block_->dbuToMicrons(y.v),
gridInstName(row, j - 1),
Expand Down Expand Up @@ -255,7 +254,7 @@ const char* Opendp::gridInstName(GridY row, GridX col)
dbMasterSeq& Opendp::gapFillers(
odb::dbTechLayer* implant,
GridX gap,
DbuY row_height,
odb::dbSite* site,
const MasterByImplant& filler_masters_by_implant)
{
auto iter = filler_masters_by_implant.find(implant);
Expand All @@ -264,7 +263,7 @@ dbMasterSeq& Opendp::gapFillers(
}
const dbMasterSeq& filler_masters = iter->second;

GapFillers& gap_fillers = gap_fillers_[implant][row_height];
GapFillers& gap_fillers = gap_fillers_[implant][site];
if (gap_fillers.size() < gap + 1) {
gap_fillers.resize(gap.v + 1);
}
Expand All @@ -275,7 +274,8 @@ dbMasterSeq& Opendp::gapFillers(
const DbuX site_width = grid_->getSiteWidth();
bool have_filler1 = smallest_filler->getWidth() == site_width;
for (dbMaster* filler_master : filler_masters) {
if (DbuY{static_cast<int>(filler_master->getHeight())} != row_height) {
if (filler_master->getSite() != site
|| filler_master->getHeight() != site->getHeight()) {
Comment thread
eder-matheus marked this conversation as resolved.
continue;
}
int filler_width = filler_master->getWidth() / site_width.v;
Expand Down
Loading