-
Notifications
You must be signed in to change notification settings - Fork 582
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
Resize to target slew removal 1 #6332
base: master
Are you sure you want to change the base?
Resize to target slew removal 1 #6332
Conversation
Signed-off-by: Martin Povišer <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
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
@@ -479,6 +479,7 @@ class Resizer : public dbStaState | |||
bool hasMultipleOutputs(const Instance* inst); | |||
|
|||
void resizePreamble(); | |||
bool areCellsSwappable(LibertyCell* existing, LibertyCell* replacement); |
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: function 'rsz::Resizer::areCellsSwappable' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
bool areCellsSwappable(LibertyCell* existing, LibertyCell* replacement);
^
Additional context
src/rsz/src/Resizer.cc:1171: the definition seen here
bool Resizer::areCellsSwappable(LibertyCell* existing, LibertyCell* candidate)
^
src/rsz/include/rsz/Resizer.hh:481: differing parameters are named here: ('replacement'), in definition: ('candidate')
bool areCellsSwappable(LibertyCell* existing, LibertyCell* replacement);
^
src/rsz/src/RepairDesign.cc
Outdated
} else { | ||
return a.first < b.first; | ||
} |
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 a.first < b.first; | |
} | |
} return a.first < b.first; | |
} | ||
|
||
if (slew_violation) { | ||
slew_violations++; |
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 expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
slew_violations++;
^
Additional context
src/rsz/src/RepairDesign.cc:363: Assuming 'drivers' is non-null
if (drivers && !drivers->empty()) {
^
src/rsz/src/RepairDesign.cc:363: Left side of '&&' is true
if (drivers && !drivers->empty()) {
^
src/rsz/src/RepairDesign.cc:363: Assuming the condition is true
if (drivers && !drivers->empty()) {
^
src/rsz/src/RepairDesign.cc:363: Taking true branch
if (drivers && !drivers->empty()) {
^
src/rsz/src/RepairDesign.cc:367: Calling 'RepairDesign::repairNet'
repairNet(net,
^
src/rsz/src/RepairDesign.cc:767: Assuming the condition is true
if (!db_network_->isSpecial(net)) {
^
src/rsz/src/RepairDesign.cc:767: Taking true branch
if (!db_network_->isSpecial(net)) {
^
src/rsz/src/RepairDesign.cc:768: Taking false branch
debugPrint(logger_,
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:777: Assuming the condition is false
if (buffer_gain_ != 0.0) {
^
src/rsz/src/RepairDesign.cc:777: Taking false branch
if (buffer_gain_ != 0.0) {
^
src/rsz/src/RepairDesign.cc:794: 'check_fanout' is true
if (check_fanout) {
^
src/rsz/src/RepairDesign.cc:794: Taking true branch
if (check_fanout) {
^
src/rsz/src/RepairDesign.cc:797: Assuming the condition is true
if (max_fanout > 0.0 && fanout_slack < 0.0) {
^
src/rsz/src/RepairDesign.cc:797: Left side of '&&' is true
if (max_fanout > 0.0 && fanout_slack < 0.0) {
^
src/rsz/src/RepairDesign.cc:797: Assuming the condition is true
if (max_fanout > 0.0 && fanout_slack < 0.0) {
^
src/rsz/src/RepairDesign.cc:797: Taking true branch
if (max_fanout > 0.0 && fanout_slack < 0.0) {
^
src/rsz/src/RepairDesign.cc:801: Taking false branch
debugPrint(logger_, RSZ, "repair_net", 3, "fanout violation");
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:804: Calling 'RepairDesign::makeRegionRepeaters'
makeRegionRepeaters(region,
^
src/rsz/src/RepairDesign.cc:1586: Assuming the condition is true
if (!region.regions_.empty()) {
^
src/rsz/src/RepairDesign.cc:1586: Taking true branch
if (!region.regions_.empty()) {
^
src/rsz/src/RepairDesign.cc:1589: Calling 'RepairDesign::makeRegionRepeaters'
makeRegionRepeaters(sub,
^
src/rsz/src/RepairDesign.cc:1586: Assuming the condition is true
if (!region.regions_.empty()) {
^
src/rsz/src/RepairDesign.cc:1586: Taking true branch
if (!region.regions_.empty()) {
^
src/rsz/src/RepairDesign.cc:1618: Assuming the condition is false
while (!region.pins_.empty()) {
^
src/rsz/src/RepairDesign.cc:1618: Loop condition is false. Execution continues on line 1633
while (!region.pins_.empty()) {
^
src/rsz/src/RepairDesign.cc:1632: Assuming the condition is true
if (!repeater_loads.empty() && repeater_loads.size() >= max_fanout / 2) {
^
src/rsz/src/RepairDesign.cc:1632: Left side of '&&' is true
if (!repeater_loads.empty() && repeater_loads.size() >= max_fanout / 2) {
^
src/rsz/src/RepairDesign.cc:1632: Assuming the condition is true
if (!repeater_loads.empty() && repeater_loads.size() >= max_fanout / 2) {
^
src/rsz/src/RepairDesign.cc:1632: Taking true branch
if (!repeater_loads.empty() && repeater_loads.size() >= max_fanout / 2) {
^
src/rsz/src/RepairDesign.cc:1633: Calling 'RepairDesign::makeFanoutRepeater'
makeFanoutRepeater(repeater_loads,
^
src/rsz/src/RepairDesign.cc:1677: 'slew_violations' declared without an initial value
int repaired_net_count, slew_violations, cap_violations = 0;
^
src/rsz/src/RepairDesign.cc:1688: Passing value via 10th parameter 'slew_violations'
slew_violations,
^
src/rsz/src/RepairDesign.cc:1679: Calling 'RepairDesign::repairNet'
repairNet(out_net,
^
src/rsz/src/RepairDesign.cc:767: Assuming the condition is true
if (!db_network_->isSpecial(net)) {
^
src/rsz/src/RepairDesign.cc:767: Taking true branch
if (!db_network_->isSpecial(net)) {
^
src/rsz/src/RepairDesign.cc:768: Assuming the condition is false
debugPrint(logger_,
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:768: Taking false branch
debugPrint(logger_,
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:777: Assuming the condition is false
if (buffer_gain_ != 0.0) {
^
src/rsz/src/RepairDesign.cc:777: Taking false branch
if (buffer_gain_ != 0.0) {
^
src/rsz/src/RepairDesign.cc:794: 'check_fanout' is false
if (check_fanout) {
^
src/rsz/src/RepairDesign.cc:794: Taking false branch
if (check_fanout) {
^
src/rsz/src/RepairDesign.cc:817: Assuming field 'parasitics_src_' is not equal to placement
if (parasitics_src_ == ParasiticsSrc::placement && resize_drvr) {
^
src/rsz/src/RepairDesign.cc:817: Left side of '&&' is false
if (parasitics_src_ == ParasiticsSrc::placement && resize_drvr) {
^
src/rsz/src/RepairDesign.cc:827: 'check_slew' is true
if (check_slew) {
^
src/rsz/src/RepairDesign.cc:827: Taking true branch
if (check_slew) {
^
src/rsz/src/RepairDesign.cc:835: Assuming the condition is false
if (slew_slack1 < 0.0f) {
^
src/rsz/src/RepairDesign.cc:835: Taking false branch
if (slew_slack1 < 0.0f) {
^
src/rsz/src/RepairDesign.cc:863: Assuming the condition is true
if (!resizer_->isTristateDriver(drvr_pin)) {
^
src/rsz/src/RepairDesign.cc:863: Taking true branch
if (!resizer_->isTristateDriver(drvr_pin)) {
^
src/rsz/src/RepairDesign.cc:868: Assuming the condition is true
if (slew_slack1 < 0.0f) {
^
src/rsz/src/RepairDesign.cc:868: Taking true branch
if (slew_slack1 < 0.0f) {
^
src/rsz/src/RepairDesign.cc:869: Assuming the condition is false
debugPrint(logger_,
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:869: Taking false branch
debugPrint(logger_,
^
src/utl/include/utl/Logger.h:370: expanded from macro 'debugPrint'
if (logger->debugCheck(tool, group, level)) { \
^
src/rsz/src/RepairDesign.cc:882: 'repair_cap' is false
if (!repair_cap) {
^
src/rsz/src/RepairDesign.cc:882: Taking true branch
if (!repair_cap) {
^
src/rsz/src/RepairDesign.cc:888: 'slew_violation' is true
if (slew_violation) {
^
src/rsz/src/RepairDesign.cc:888: Taking true branch
if (slew_violation) {
^
src/rsz/src/RepairDesign.cc:889: The expression is an uninitialized value. The computed value will also be garbage
slew_violations++;
^
Signed-off-by: Martin Povišer <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Martin Povišer <[email protected]>
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
src/rsz/src/RepairDesign.cc
Outdated
|
||
for (LibertyCell* size_cell : *equiv_cells) { | ||
if (resizer_->areCellsSwappable(cell, size_cell)) { | ||
float limit, limit_w_margin, violation = 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: unused variable 'limit_w_margin' [clang-diagnostic-unused-variable]
float limit, limit_w_margin, violation = 0;
^
Signed-off-by: Martin Povišer <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
I understand that this is an intermediate change. But how do we ensure that users don't experience QoR degradation until the API change is complete? Would it be better to make a combined PR which actually delivers better QoR? |
Even if it's an intermediate change it shouldn't be degrading QoR. I have run ORFS on this, these were the failures:
Augusto is looking into the placer divergence. The sky130hd/microwatt congestion doesn't worry me too much as I have seen that design is sensitive to flow changes and prone to congestion. |
Decouple resize to target slew from max slew repair to prepare its removal. Rewrite the top-level logic of
repairNet(Net*,Pin*,Vertex*)
to make it clearer what happens in response to what.