Skip to content

odb: create dbBTerm::getChipBump#9697

Open
ahmed532 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
ahmed532:feat/odb-dbTerm-dbChipBump
Open

odb: create dbBTerm::getChipBump#9697
ahmed532 wants to merge 2 commits intoThe-OpenROAD-Project:masterfrom
ahmed532:feat/odb-dbTerm-dbChipBump

Conversation

@ahmed532
Copy link

@ahmed532 ahmed532 commented Mar 9, 2026

To be able to get the dbChipBump from the bterm

Closes: #9626

@ahmed532 ahmed532 self-assigned this Mar 9, 2026
To be able to get the dbChipBump from the bterm

Signed-off-by: Ahmed R. Mohamed <ahmed@precisioninno.com>
@ahmed532 ahmed532 force-pushed the feat/odb-dbTerm-dbChipBump branch from a8170a9 to d12ccd3 Compare March 9, 2026 05:47
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new method dbBTerm::getChipBump() to provide a direct way to get the dbChipBump associated with a dbBTerm. This is achieved by adding a back-reference from dbBTerm to dbChipBump, which is populated when dbChipBump::setBTerm is called. The database schema has been updated accordingly. This new method is then used to refactor and simplify the logic in 3dblox.cpp, removing the need for manually building a port-to-bump map. The changes are well-implemented and improve code clarity. I have one minor suggestion to improve code quality.

Note: Security Review did not run due to the size of the PR.


dbChipBump* dbBTerm::getChipBump() const
{
_dbBTerm* obj = (_dbBTerm*) this;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The C-style cast (_dbBTerm*) this within a const method is effectively a const_cast, which is generally unsafe. Since you are only reading from the object, it's safer and clearer to cast to a const pointer, which avoids the const_cast.

  const _dbBTerm* obj = (const _dbBTerm*) this;

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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

Signed-off-by: Ahmed R. Mohamed <ahmed@precisioninno.com>
@ahmed532 ahmed532 requested a review from osamahammad21 March 9, 2026 18:05
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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

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.

ODB: add mapping from dbBTerm to related dbChipBump

1 participant