-
Notifications
You must be signed in to change notification settings - Fork 566
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
Phase 3 hierarchical module swap #6240
Phase 3 hierarchical module swap #6240
Conversation
openroad-robot
commented
Nov 26, 2024
- added a new test that does module swap in a multi-level design
- changed module search to do recursive search for all levels of hierarchy
- added an error check for the same module swap
1) added a new test that does module swap in a multi-level design 2) changed module search to do recursive search for all levels of hierarchy 3) added an error check for the same module swap Signed-off-by: Cho Moon <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Cho Moon <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
@andyfox-rushc, here is a 3 level hierarchical testcase you asked for. |
src/odb/src/db/dbModInst.cpp
Outdated
// Check if module names differ | ||
if (strcmp(old_module_name, new_module_name) == 0) { | ||
logger->warn(utl::ODB, | ||
470, | ||
"The modules cannot be swapped because the new module {} is " | ||
"identical to the existing module", | ||
new_module_name); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a return here if the swap can't continue or use error()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
src/dbSta/src/dbNetwork.cc
Outdated
auto recursiveSearch | ||
= [this](Instance* inst, const char* name, auto& self) -> dbModule* { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not essential but you could capture recursiveSearch rather than make it an argument, though you would have to declare its type rather than use auto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API has been removed and replaced by dbBlock::findModule().
@andyfox-rushc any comments? |
To find a module (anywhere in the hierarchy) use: dbBlock::findModule(const char* name). |
Signed-off-by: Cho Moon <[email protected]>
@andyfox-rushc , thanks much for the suggestion. I did the replacement. Initially, I thought this caused inconsistency between STA and ODB but this was not due to this change. |
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Cho Moon <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Cho Moon <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |