Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
1060 Genclks.cc:275 no master clock found for generated clock %s.
1062 Genclks.cc:939 generated clock %s source pin %s missing paths from master clock %s.
1100 Power.cc:556 unknown cudd constant
1101 Power.cc:651 poor convergence of propagated activities for power estimation after %d passes
1110 Liberty.cc:763 cell %s/%s port %s not found in cell %s/%s.
1111 Liberty.cc:789 cell %s/%s %s -> %s timing group %s not found in cell %s/%s.
1112 Liberty.cc:808 Liberty cell %s/%s for corner %s/%s not found.
Expand Down
38 changes: 22 additions & 16 deletions power/Power.cc
Original file line number Diff line number Diff line change
Expand Up @@ -629,22 +629,28 @@ Power::ensureActivities()
bfs.visit(levelize_->maxLevel(), &visitor);
// Propagate activiities through registers.
InstanceSet regs = std::move(visitor.visitedRegs());
int pass = 1;
while (!regs.empty() && pass < max_activity_passes_) {
visitor.init();
InstanceSet::Iterator reg_iter(regs);
while (reg_iter.hasNext()) {
const Instance *reg = reg_iter.next();
// Propagate activiities across register D->Q.
seedRegOutputActivities(reg, bfs);
}
// Propagate register output activities through
// combinational logic.
bfs.visit(levelize_->maxLevel(), &visitor);
regs = std::move(visitor.visitedRegs());
debugPrint(debug_, "power_activity", 1, "Pass %d change %.2f",
pass, visitor.maxChange());
pass++;
if (!regs.empty()) {
int pass = 1;
while (!regs.empty() && pass < max_activity_passes_) {
visitor.init();
InstanceSet::Iterator reg_iter(regs);
while (reg_iter.hasNext()) {
const Instance *reg = reg_iter.next();
// Propagate activiities across register D->Q.
seedRegOutputActivities(reg, bfs);
}
// Propagate register output activities through
// combinational logic.
bfs.visit(levelize_->maxLevel(), &visitor);
regs = std::move(visitor.visitedRegs());
debugPrint(debug_, "power_activity", 1, "Pass %d change %.2f",
pass, visitor.maxChange());
pass++;
}
if (visitor.maxChange() > 0.20) {
Copy link
Owner

Choose a reason for hiding this comment

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

This warns for nearly every power regression I have even though the activities indeed do converge. Consider a circuit with no feedback. When the activities propagate on the first pass they change by whatever the input activity is (with may be > .2). Since there is no feedback they are not re-queued and regs is empty. The activities are converged but it still warns about non-convergence. I think the true criteria for non-convergence is "pass == max_activity_passes_". All of the opensta regressions I have converge, so maybe the place to start is to make a test case and submit it as an issue.

report_->warn(1101, "poor convergence of propagated activities for power estimation after %d passes",
max_activity_passes_);
}
}
activities_valid_ = true;
}
Expand Down