@@ -155,7 +155,8 @@ bool route(const Netlist<>& net_list,
155155 VTR_ASSERT (router_lookahead != nullptr );
156156
157157 /* Routing parameters */
158- float pres_fac = update_draw_pres_fac (router_opts.first_iter_pres_fac ); /* Typically 0 -> ignore cong. */
158+ float pres_fac = router_opts.first_iter_pres_fac ;
159+ update_draw_pres_fac (pres_fac); /* Typically 0 -> ignore cong. */
159160 int bb_fac = router_opts.bb_factor ;
160161
161162 /* When routing conflicts are detected the bounding boxes are scaled
@@ -357,7 +358,8 @@ bool route(const Netlist<>& net_list,
357358 // Decrease pres_fac so that critical connections will take more direct routes
358359 // Note that we use first_iter_pres_fac here (typically zero), and switch to
359360 // use initial_pres_fac on the next iteration.
360- pres_fac = update_draw_pres_fac (router_opts.first_iter_pres_fac );
361+ pres_fac = router_opts.first_iter_pres_fac ;
362+ update_draw_pres_fac (pres_fac);
361363
362364 // Reduce timing tolerances to re-route more delay-suboptimal signals
363365 connections_inf.set_connection_criticality_tolerance (0.7 );
@@ -374,7 +376,8 @@ bool route(const Netlist<>& net_list,
374376 // after the first routing convergence. Since that is often zero,
375377 // we want to set pres_fac to a reasonable (i.e. typically non-zero)
376378 // value afterwards -- so it grows when multiplied by pres_fac_mult
377- pres_fac = update_draw_pres_fac (router_opts.initial_pres_fac );
379+ pres_fac = router_opts.initial_pres_fac ;
380+ update_draw_pres_fac (pres_fac);
378381 }
379382
380383 // Have we converged the maximum number of times, did not make any changes, or does it seem
@@ -437,12 +440,13 @@ bool route(const Netlist<>& net_list,
437440
438441 // Update pres_fac
439442 if (itry == 1 ) {
440- pres_fac = update_draw_pres_fac (router_opts.initial_pres_fac );
443+ pres_fac = router_opts.initial_pres_fac ;
444+ update_draw_pres_fac (pres_fac);
441445 } else {
442446 pres_fac *= router_opts.pres_fac_mult ;
443-
444- /* Avoid overflow for high iteration counts, even if acc_cost is big */
445- pres_fac = update_draw_pres_fac (std::min ( pres_fac, static_cast < float >(HUGE_POSITIVE_FLOAT / 1e5 )) );
447+ pres_fac = std::min (pres_fac, router_opts. max_pres_fac );
448+ /* Set the maximum pres_fac to the value passed by the command line argument */
449+ update_draw_pres_fac (pres_fac);
446450
447451 // Increase short path criticality if it's having a hard time resolving hold violations due to congestion
448452 if (budgeting_inf.if_set ()) {
0 commit comments