Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRT: Stubborn Tiles flow #6213

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

openroad-robot
Copy link
Contributor

When the number of DRVs is less than or equal to 11 DRVs, we start this new flow where we do the following:

  • Identify DRV locations
  • Cluster nearby DRVs into regions
  • Create multiple workers for each DRV region with different parameters (45 possible worker for each DRV cluster):
    • DRVs_LOCATION { center-center, center-east, center-west, center-north, center-south }
    • DRC_COST { workerDRCCost, workerDRCCost / 2, workerDRCCost * 2 }
    • MARKER_COST { workerMarkerCost, workerMarkerCost / 2, workerMarkerCost * 2 }
  • Choose the best result and commit.

Improvement in ISPD designs:
image
Improvement in public ORFS designs (designs with no change are hidden):
image

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

IterationProgress iter_prog;
auto block = getDesign()->getTopBlock();
const auto num_drvs = block->getNumMarkers();
const bool stubborn_flow = num_drvs <= 11 && ripupMode != RipUpMode::ALL
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 11? would this be better as a function of DRCs per unit area (it seems like 11 would be a large number for small design and potentially a small number for a large design)?

std::unique_ptr<FlexDRWorker> createWorker(int x_offset,
int y_offset,
const SearchRepairArgs& args,
Rect routeBox = Rect(0, 0, 0, 0));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take by reference? Rect() is 0,0,0,0 so no need to specify.

Comment on lines +92 to +101
bool isEqualIgnoringSizeAndOffset(const SearchRepairArgs& other) const
{
return (mazeEndIter == other.mazeEndIter
&& workerDRCCost == other.workerDRCCost
&& workerMarkerCost == other.workerMarkerCost
&& workerFixedShapeCost == other.workerFixedShapeCost
&& std::fabs(workerMarkerDecay - other.workerMarkerDecay) < 1e-6
&& ripupMode == other.ripupMode
&& followGuide == other.followGuide);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overly long for an inline in a header. Not performance critical so out-of-line.

Comment on lines +1851 to +1853
if (iter_ > router_cfg_->END_ITERATION) {
break;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously this was after searchRepair so it seems one more iteration would have been done.

ProfileTask profile(fmt::format("DR:searchRepair{}", iter_).c_str());

if (dist_on_) {
if ((iter_ % 10 == 0 && iter_ != 60) || iter_ == 3 || iter_ == 15) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? Please give some motivating logic.

Comment on lines +835 to +838
std::vector<Rect> merge_boxes;
for (auto& box : drv_boxes) {
merge_boxes.emplace_back(box);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::vector<Rect> merge_boxes{drv_boxes}; compact and more efficient.

for (auto it2 = it1 + 1; it2 != merge_boxes.end(); ++it2) {
Rect merge_box = (*it1);
merge_box.merge((*it2));
if (merge_box.dx() > 4 || merge_box.dy() > 4) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smaller than or equal to 5x5 GCells seems to conflict

continue;
}
(*it1).merge((*it2));
merge_boxes.erase(it2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This invalidates both your iterators.

const int rect_id)
{
return std::any_of(grid.begin() + rect.xMin(),
grid.begin() + rect.xMax() + 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you certain that this will never be beyond the end of the vector? Likewise in the inner any_of

Comment on lines +910 to +911
case frDirEnum::E:
max_idx.addX(1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you expand W you check for 0 but when expanding E you don't check for the right edge?

@maliberty
Copy link
Member

Where does this prevent abutting workers from running simultaneously?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants