-
Notifications
You must be signed in to change notification settings - Fork 553
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
rsz: Add option for Steiner tree amending in net repair #5487
base: master
Are you sure you want to change the base?
Conversation
Add an option `-amend_tree` to `repair_design` for requesting timing-aware amending of the Steiner trees used in the repair process. The buffers inserted by `repair_design` dictate much of the final buffer tree topology. The intent with `-amend_tree` is for `repair_design` to place its buffers in a way that has less of a chance of constraining us into a buffering topology which would be a timing bottleneck later on.
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.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 50. Check the log or trigger a new build to see more.
BufferedNetPtr pairing_candidate_; | ||
std::vector<BufferedNetPtr> pending_candidates_; | ||
|
||
BufferedNet *place_ = NULL; |
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.
warning: use nullptr [modernize-use-nullptr]
BufferedNet *place_ = NULL; | |
BufferedNet *place_ = nullptr; |
|
||
BufferedNet *place_ = NULL; | ||
|
||
BufferedNet *upstream_ = NULL; |
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.
warning: use nullptr [modernize-use-nullptr]
BufferedNet *upstream_ = NULL; | |
BufferedNet *upstream_ = nullptr; |
@@ -141,6 +141,87 @@ int RepairSetup::rebuffer(const Pin* drvr_pin) | |||
return inserted_buffer_count; | |||
} | |||
|
|||
int RepairSetup::rebuffer(const Pin* drvr_pin, BufferedNetPtr bnet) |
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.
warning: the parameter 'bnet' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
int RepairSetup::rebuffer(const Pin* drvr_pin, BufferedNetPtr bnet) | |
int RepairSetup::rebuffer(const Pin* drvr_pin, const BufferedNetPtr& bnet) |
src/rsz/src/RepairSetup.hh:195:
- int rebuffer(const Pin* drvr_pin, BufferedNetPtr bnet);
+ int rebuffer(const Pin* drvr_pin, const BufferedNetPtr& bnet);
{ | ||
init(); | ||
resizer_->incrementalParasiticsBegin(); | ||
inserted_buffer_count_ = rebuffer(drvr_pin, bnet); |
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.
warning: parameter 'bnet' is passed by value and only copied once; consider moving it to avoid unnecessary copies [performance-unnecessary-value-param]
src/rsz/src/Rebuffer.cc:35:
- #include "BufferedNet.hh"
+ #include <utility>
+
+ #include "BufferedNet.hh"
inserted_buffer_count_ = rebuffer(drvr_pin, bnet); | |
inserted_buffer_count_ = rebuffer(drvr_pin, std::move(bnet)); |
copyState(sta_); | ||
} | ||
|
||
void dumpBranch(std::ostream &f, BufferedNetPtr net, float scale, int level=0) |
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.
warning: the parameter 'net' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
void dumpBranch(std::ostream &f, BufferedNetPtr net, float scale, int level=0) | |
void dumpBranch(std::ostream &f, const BufferedNetPtr& net, float scale, int level=0) |
left = std::make_shared<BufferedNet>( | ||
BufferedNetType::wire, loc, BufferedNet::null_layer, | ||
left, corner_, resizer_); | ||
if (loc != right->location()) |
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.
warning: statement should be inside braces [google-readability-braces-around-statements]
if (loc != right->location()) | |
if (loc != right->location()) { |
src/rsz/src/TreeAmending.cc:224:
- right, corner_, resizer_);
+ right, corner_, resizer_);
+ }
right, | ||
resizer_); | ||
|
||
if (loc != net->location()) |
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.
warning: statement should be inside braces [google-readability-braces-around-statements]
if (loc != net->location()) | |
if (loc != net->location()) { |
src/rsz/src/TreeAmending.cc:237:
- else
+ } else
else | ||
return junc; |
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.
warning: do not use 'else' after 'return' [readability-else-after-return]
else | |
return junc; | |
return junc; |
return std::make_shared<BufferedNet>( | ||
BufferedNetType::wire, net->location(), BufferedNet::null_layer, | ||
junc, corner_, resizer_); | ||
else |
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.
warning: statement should be inside braces [google-readability-braces-around-statements]
else
^
this fix will not be applied because it overlaps with another fix
BufferedNetPtr seed = root->pairing_candidate_; | ||
BufferedNet *place = seed->place_; | ||
|
||
place->pairing_candidate_ = NULL; |
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.
warning: use nullptr [modernize-use-nullptr]
place->pairing_candidate_ = NULL; | |
place->pairing_candidate_ = nullptr; |
Note: This is up so that it can be discussed. There are no plans to get it merged at the moment.
Add an option
-amend_tree
torepair_design
for requestingtiming-aware amending of the Steiner trees used in the repair process.
The buffers inserted by
repair_design
dictate much of the final buffertree topology. The intent with
-amend_tree
is forrepair_design
toplace its buffers in a way that has less of a chance of constraining us
into a buffering topology which would be a timing bottleneck later on.