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

CTS-Avoid level balance buffers overlap. #5819

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

Conversation

arthurjolo
Copy link
Contributor

The current Level Balancer of CTS tends to insert buffers one on top of the other and when they are legalized a cluster of buffers is formed, issue #2305 shows an example of this. This happens specially if the clock buffers are large and it creates a high congested area that can lead to the global router finishing with overflow.

This PR changes the level balancer to avoid overlapping the inserted buffers and preventing the creation of the clusters of buffers. The next images show the result for the regressions test of CTS balance_levels:
Current:
image

New:
image

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

src/cts/src/LevelBalancer.cpp Show resolved Hide resolved
src/cts/src/LevelBalancer.cpp Show resolved Hide resolved
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

github-actions bot commented Oct 4, 2024

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

@maliberty
Copy link
Member

secure ci?

/ wireSegmentUnit_;
Point<double> bufferLoc(x, y);
if (level % buffPerStep) {
x = (x + width);
Copy link
Member

Choose a reason for hiding this comment

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

x += width; is more idiomatic. (likewise y)

Comment on lines 102 to 107
int dir = (centroidY - y) / std::abs(centroidY - y);
double height = builder->getBufferHeight() * wireSegmentUnit_ * dir;
double width = builder->getBufferWidth() * wireSegmentUnit_ * dir;

int steps = std::max((int) (std::abs((centroidY - y) / height)), 1);
int buffPerStep = std::ceil((float) bufLevels / (float) steps);
Copy link
Member

Choose a reason for hiding this comment

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

const

int x = prevLevelSubNet->getDriver()->getX();
int y = prevLevelSubNet->getDriver()->getY();

int dir = (centroidY - y) / std::abs(centroidY - y);
Copy link
Member

Choose a reason for hiding this comment

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

Why use the same direction for both x & y? You might be moving away from the centroid in x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I missed that. It was already fixed, thanks.

@arthurjolo
Copy link
Contributor Author

Secure Ci is passing, only need to update a antenna diode count metric for 1 design. I am going to create a PR for this update.

Copy link
Contributor

github-actions bot commented Oct 4, 2024

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

@arthurjolo arthurjolo marked this pull request as draft October 9, 2024 19:25
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.

2 participants