vpr/src/place/place.cpp
/* Function to recompute the criticalities before the inner loop of the annealing */
Function to recompute the criticalities before the inner loop of the annealing
Function to recompute the criticalities before the inner loop of the annealing
static void outer_loop_recompute_criticalities(const t_placer_opts& placer_opts,
                                               t_placer_costs* costs,
                                               t_placer_prev_inverse_costs* prev_inverse_costs,
                                               int num_connections,
                                               float crit_exponent,
                                               int* outer_crit_iter_count,
                                               const ClusteredPinAtomPinsLookup& netlist_pin_lookup,
                                               const PlaceDelayModel* delay_model,
                                               SetupTimingInfo& timing_info) {
    if (placer_opts.place_algorithm != PATH_TIMING_DRIVEN_PLACE)
        return;
    if (*outer_crit_iter_count >= placer_opts.recompute_crit_iter
        || placer_opts.inner_loop_recompute_divider != 0) {
#ifdef VERBOSE
        VTR_LOG("Outer loop recompute criticalities\n");
#endif
        num_connections = std::max(num_connections, 1); 
        VTR_ASSERT(num_connections > 0);
        timing_info.update();
        load_criticalities(timing_info, crit_exponent, netlist_pin_lookup);
        comp_td_costs(delay_model, &costs->timing_cost);
        *outer_crit_iter_count = 0;
    }
    (*outer_crit_iter_count)++;
    prev_inverse_costs->bb_cost = 1 / costs->bb_cost;
    prev_inverse_costs->timing_cost = min(1 / costs->timing_cost, MAX_INV_TIMING_COST);
}
static void outer_loop_recompute_criticalities ( const t_placer_opts & placer_opts , t_placer_costs * costs , t_placer_prev_inverse_costs * prev_inverse_costs , int num_connections , float crit_exponent , int * outer_crit_iter_count , const ClusteredPinAtomPinsLookup & netlist_pin_lookup , const PlaceDelayModel * delay_model , SetupTimingInfo & timing_info ) { if ( placer_opts . place_algorithm != PATH_TIMING_DRIVEN_PLACE ) return ; if ( * outer_crit_iter_count >= placer_opts . recompute_crit_iter || placer_opts . inner_loop_recompute_divider != 0 ) { #ifdef VERBOSE VTR_LOG ( " \n " ) ; #endif num_connections = std :: max ( num_connections , 1 ) ; VTR_ASSERT ( num_connections > 0 ) ; timing_info . update ( ) ; load_criticalities ( timing_info , crit_exponent , netlist_pin_lookup ) ; comp_td_costs ( delay_model , & costs -> timing_cost ) ; * outer_crit_iter_count = 0 ; } ( * outer_crit_iter_count ) ++ ; prev_inverse_costs -> bb_cost = 1 / costs -> bb_cost ; prev_inverse_costs -> timing_cost = min ( 1 / costs -> timing_cost , MAX_INV_TIMING_COST ) ; }
Function to recompute the criticalities before the inner loop of the annealing
Function to recompute the criticalities before the inner loop of the annealing
/*at each temperature change we update these values to be used     */ /*for normalizing the tradeoff between timing and wirelength (bb)  */ //Avoid division by zero //Per-temperature timing update /*recompute costs from scratch, based on new criticalities */ /*at each temperature change we update these values to be used     */ /*for normalizing the tradeoff between timing and wirelength (bb)  */ /*Prevent inverse timing cost from going to infinity */