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

Add support to LEF58_MAXSPACING in ODB and DRT #5287

Conversation

openroad-robot
Copy link
Contributor

In this PR:

  • Support LEF58_MAXSPACING in ODB with necessary tests
  • Support LEF58_MAXSPACING in DRT database
  • Set a secondary via def for each cut layer that has a different cutclass than the default
  • Detect lonely vias after routing according the LEF58_MAXSPACING rule
  • Substitute all lonely vias with a secondary via
  • Patching minstep resulting from secondary via defs in GC

@osamahammad21 osamahammad21 marked this pull request as ready for review June 25, 2024 22:51
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/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Outdated Show resolved Hide resolved
src/drt/src/frRegionQuery.cpp Outdated Show resolved Hide resolved
src/drt/src/frRegionQuery.cpp Outdated Show resolved Hide resolved
{
_dbTechLayerMaxSpacingRule* obj = (_dbTechLayerMaxSpacingRule*) this;

obj->cut_class_ = cut_class;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: parameter 'cut_class' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]

src/odb/src/db/dbTechLayerMaxSpacingRule.cpp:34:

+ 
+ #include <utility>
Suggested change
obj->cut_class_ = cut_class;
obj->cut_class_ = std::move(cut_class);

#include "odb/db.h"
#include "odb/lefin.h"

using namespace odb;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: do not use namespace using-directives; use using-declarations instead [google-build-using-namespace]

using namespace odb;
^

@osamahammad21
Copy link
Member

@maliberty Passes all CIs. Ready for review

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/drt/src/dr/FlexDR_maze.cpp Outdated Show resolved Hide resolved
src/drt/src/dr/FlexDR_maze.cpp Outdated Show resolved Hide resolved
src/drt/src/dr/FlexDR_maze.cpp Outdated Show resolved Hide resolved
src/drt/src/io/io_parser_helper.cpp Outdated Show resolved Hide resolved
src/drt/src/io/io_parser_helper.cpp Outdated Show resolved Hide resolved
@maliberty
Copy link
Member

Please resolve the clang-tidy

Copy link
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

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

I'll review the KDTree once I understand why it is necessary

src/odb/src/lefin/MaxSpacingParser.cpp Outdated Show resolved Hide resolved
src/drt/src/io/io_parser_helper.cpp Outdated Show resolved Hide resolved
src/drt/src/TritonRoute.tcl Outdated Show resolved Hide resolved
for (auto [obj, box] : vias) {
via_positions.emplace_back(box.xCenter(), box.yCenter());
}
KDTree tree(via_positions);
Copy link
Member

Choose a reason for hiding this comment

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

Why not use a boost rtree?

src/drt/src/dr/FlexDR.cpp Outdated Show resolved Hide resolved
src/drt/src/io/io_parser_helper.cpp Outdated Show resolved Hide resolved
src/drt/src/io/io_parser_helper.cpp Show resolved Hide resolved
Signed-off-by: osamahammad21 <[email protected]>
@osamahammad21
Copy link
Member

@maliberty Can we merge this?

src/drt/src/dr/FlexDR.cpp Outdated Show resolved Hide resolved
Signed-off-by: osamahammad21 <[email protected]>
src/drt/src/dr/FlexDR.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.hpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
src/drt/src/db/infra/KDTree.cpp Outdated Show resolved Hide resolved
@maliberty maliberty merged commit 28f8d02 into The-OpenROAD-Project:master Aug 6, 2024
10 checks passed
@maliberty maliberty deleted the TR-maxspacing branch August 6, 2024 15:48
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

#include "frBaseTypes.h"
#include "odb/geom.h"

using odb::Orientation2D;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: using declarations in the global namespace in headers are prohibited [google-global-names-in-headers]

using odb::Orientation2D;
^

#include "odb/geom.h"

using odb::Orientation2D;
using odb::Point;
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: using declarations in the global namespace in headers are prohibited [google-global-names-in-headers]

using odb::Point;
^


void radiusSearchHelper(KDTreeNode* node,
const Point& target,
const frSquaredDistance radius_square,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: parameter 'radius_square' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]

Suggested change
const frSquaredDistance radius_square,
frSquaredDistance radius_square,

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.

3 participants