Skip to content

Commit e45f0cd

Browse files
[STA] Fixed Incremental Slack Timing Analysis Verify Code
In debug mode, the STA checks if the incremental STA matches the STA computed from scratch. In this check it checked for if the critical nodes matched; however, the nodes returned are not stably deterministic (it does not break ties in a deterministic way). After discussing with Vaughn, it is safe to just remove the nodes check since it would not change the result of the analysis. closes #2754
1 parent b3b3084 commit e45f0cd

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

vpr/src/timing/slack_evaluation.cpp

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -436,33 +436,28 @@ bool SetupSlackCrit::verify_pin_criticalities(const tatum::TimingGraph& timing_g
436436

437437
bool SetupSlackCrit::verify_max_req_worst_slack(const tatum::TimingGraph& timing_graph, const tatum::SetupTimingAnalyzer& analyzer) {
438438
auto calc_max_req = max_req_;
439-
auto calc_max_req_node = max_req_node_;
440-
441439
auto calc_worst_slack = worst_slack_;
442-
auto calc_worst_slack_node = worst_slack_node_;
443440

444441
recompute_max_req_and_worst_slack(timing_graph, analyzer);
445442

443+
// NOTE: We only check if the required time and the worst slack matches, we
444+
// do not check if the max required nodes or the worst slack nodes
445+
// match. This is because the incremental timing analysis and the non-
446+
// incremental timing analysis do not break ties deterministically,
447+
// so they may get different nodes; but they should always get the same
448+
// required time and worst slack. If the incremental timing analysis
449+
// gets different nodes, this will not change the results of the
450+
// timing analysis.
446451
if (calc_max_req != max_req_) {
447452
VPR_ERROR(VPR_ERROR_TIMING,
448453
"Calculated max required times does not match value calculated from scratch");
449454
return false;
450455
}
451-
if (calc_max_req_node != max_req_node_) {
452-
VPR_ERROR(VPR_ERROR_TIMING,
453-
"Calculated max required nodes does not match value calculated from scratch");
454-
return false;
455-
}
456456
if (calc_worst_slack != worst_slack_) {
457457
VPR_ERROR(VPR_ERROR_TIMING,
458458
"Calculated worst slack does not match value calculated from scratch");
459459
return false;
460460
}
461-
if (calc_worst_slack_node != worst_slack_node_) {
462-
VPR_ERROR(VPR_ERROR_TIMING,
463-
"Calculated worst slack nodes does not match value calculated from scratch");
464-
return false;
465-
}
466461

467462
return true;
468463
}

0 commit comments

Comments
 (0)