Skip to content

[STA] Fixed Incremental Slack Timing Analysis Verify Code #2774

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

Merged
Merged
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
21 changes: 8 additions & 13 deletions vpr/src/timing/slack_evaluation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,33 +436,28 @@ bool SetupSlackCrit::verify_pin_criticalities(const tatum::TimingGraph& timing_g

bool SetupSlackCrit::verify_max_req_worst_slack(const tatum::TimingGraph& timing_graph, const tatum::SetupTimingAnalyzer& analyzer) {
auto calc_max_req = max_req_;
auto calc_max_req_node = max_req_node_;

auto calc_worst_slack = worst_slack_;
auto calc_worst_slack_node = worst_slack_node_;

recompute_max_req_and_worst_slack(timing_graph, analyzer);

// NOTE: We only check if the required time and the worst slack matches, we
// do not check if the max required nodes or the worst slack nodes
// match. This is because the incremental timing analysis and the non-
// incremental timing analysis do not break ties deterministically,
// so they may get different nodes; but they should always get the same
// required time and worst slack. If the incremental timing analysis
// gets different nodes, this will not change the results of the
// timing analysis.
if (calc_max_req != max_req_) {
VPR_ERROR(VPR_ERROR_TIMING,
"Calculated max required times does not match value calculated from scratch");
return false;
}
if (calc_max_req_node != max_req_node_) {
VPR_ERROR(VPR_ERROR_TIMING,
"Calculated max required nodes does not match value calculated from scratch");
return false;
}
if (calc_worst_slack != worst_slack_) {
VPR_ERROR(VPR_ERROR_TIMING,
"Calculated worst slack does not match value calculated from scratch");
return false;
}
if (calc_worst_slack_node != worst_slack_node_) {
VPR_ERROR(VPR_ERROR_TIMING,
"Calculated worst slack nodes does not match value calculated from scratch");
return false;
}

return true;
}
Expand Down
Loading