File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ struct TimingContext : public Context {
113113 std::shared_ptr<tatum::TimingConstraints> constraints;
114114
115115 t_timing_analysis_profile_info stats;
116+
117+ /* Represents whether or not VPR should fail if timing constraints aren't met. */
118+ bool terminate_if_timing_fails = false ;
119+
116120};
117121
118122namespace std {
Original file line number Diff line number Diff line change 99#include " timing_util.h"
1010#include " timing_fail_error.h"
1111
12- /* Represents whether or not VPR should fail if timing constraints aren't met. */
13- static bool terminate_if_timing_fails = false ;
14-
1512/* True if negative final slack. */
1613static bool failed_timing = false ;
1714
1815void set_terminate_if_timing_fails (bool cmd_opt_terminate_if_timing_fails) {
19- terminate_if_timing_fails = cmd_opt_terminate_if_timing_fails;
16+ auto & timing_ctx = g_vpr_ctx.mutable_timing ();
17+ timing_ctx.terminate_if_timing_fails = cmd_opt_terminate_if_timing_fails;
2018}
2119
2220/* Checks if slack is negative, if routing is finished, and if user wants VPR flow to fail if their
@@ -25,7 +23,9 @@ void set_terminate_if_timing_fails(bool cmd_opt_terminate_if_timing_fails) {
2523void check_if_failed_timing_constraints (double & slack, std::string prefix) {
2624 // The error should only be thrown after routing. Checking that prefix == "Final" ensures that
2725 // only negative slacks found after routing are considered.
28- if (terminate_if_timing_fails && slack < 0 && prefix == " Final " ) {
26+ auto & timing_ctx = g_vpr_ctx.timing ();
27+
28+ if (timing_ctx.terminate_if_timing_fails && slack < 0 && prefix == " Final " ) {
2929 failed_timing = true ;
3030 }
3131 return ;
You can’t perform that action at this time.
0 commit comments