12
12
#include " rr_graph.h"
13
13
#include " router_lookahead_report.h"
14
14
#include " vtr_time.h"
15
+ #include " vtr_expr_eval.h"
15
16
16
17
bool route (const Netlist<>& net_list,
17
18
int width_fac,
@@ -251,6 +252,10 @@ bool route(const Netlist<>& net_list,
251
252
int rcv_finished_count = RCV_FINISH_EARLY_COUNTDOWN;
252
253
253
254
print_route_status_header ();
255
+ #ifndef NO_GRAPHICS
256
+ // Reset router iteration in the current route attempt.
257
+ get_bp_state_globals ()->get_glob_breakpoint_state ()->router_iter = 0 ;
258
+ #endif
254
259
for (itry = 1 ; itry <= router_opts.max_router_iterations ; ++itry) {
255
260
/* Reset "is_routed" and "is_fixed" flags to indicate nets not pre-routed (yet) */
256
261
for (auto net_id : net_list.nets ()) {
@@ -268,6 +273,11 @@ bool route(const Netlist<>& net_list,
268
273
worst_negative_slack = timing_info->hold_total_negative_slack ();
269
274
}
270
275
276
+ #ifndef NO_GRAPHICS
277
+ // Update router information and check breakpoint.
278
+ update_router_info_and_check_bp (BP_ROUTE_ITER, -1 );
279
+ #endif
280
+
271
281
/* Initial criticalities: set to 1 on the first iter if the user asked for it */
272
282
if (router_opts.initial_timing == e_router_initial_timing::ALL_CRITICAL && itry == 1 )
273
283
netlist_router->set_timing_info (make_constant_timing_info (1 ));
@@ -400,19 +410,13 @@ bool route(const Netlist<>& net_list,
400
410
if (legal_convergence_count >= router_opts.max_convergence_count
401
411
|| iter_results.stats .connections_routed == 0
402
412
|| early_reconvergence_exit_heuristic (router_opts, itry_since_last_convergence, timing_info, best_routing_metrics)) {
403
- #ifndef NO_GRAPHICS
404
- update_router_info_and_check_bp (BP_ROUTE_ITER, -1 );
405
- #endif
406
413
break ; // Done routing
407
414
}
408
415
409
416
/*
410
417
* Abort checks: Should we give-up because this routing problem is unlikely to converge to a legal routing?
411
418
*/
412
419
if (itry == 1 && early_exit_heuristic (router_opts, wirelength_info)) {
413
- #ifndef NO_GRAPHICS
414
- update_router_info_and_check_bp (BP_ROUTE_ITER, -1 );
415
- #endif
416
420
// Abort
417
421
break ;
418
422
}
@@ -423,18 +427,12 @@ bool route(const Netlist<>& net_list,
423
427
424
428
if (!std::isnan (est_success_iteration) && est_success_iteration > abort_iteration_threshold && router_opts.routing_budgets_algorithm != YOYO) {
425
429
VTR_LOG (" Routing aborted, the predicted iteration for a successful route (%.1f) is too high.\n " , est_success_iteration);
426
- #ifndef NO_GRAPHICS
427
- update_router_info_and_check_bp (BP_ROUTE_ITER, -1 );
428
- #endif
429
430
break ; // Abort
430
431
}
431
432
}
432
433
433
434
if (itry == 1 && router_opts.exit_after_first_routing_iteration ) {
434
435
VTR_LOG (" Exiting after first routing iteration as requested\n " );
435
- #ifndef NO_GRAPHICS
436
- update_router_info_and_check_bp (BP_ROUTE_ITER, -1 );
437
- #endif
438
436
break ;
439
437
}
440
438
0 commit comments