vpr/src/place/place.cpp
/* Update the point_to_point_timing_cost values from the temporary *
 * values for all connections that have changed.                   */
Update the point_to_point_timing_cost values from the temporary
values for all connections that have changed.
Update the point_to_point_timing_cost values from the temporary values for all connections that have changed .
static void update_td_cost(const t_pl_blocks_to_be_moved& blocks_affected) {
    auto& cluster_ctx = g_vpr_ctx.clustering();
    for (int iblk = 0; iblk < blocks_affected.num_moved_blocks; iblk++) {
        ClusterBlockId bnum = blocks_affected.moved_blocks[iblk].block_num;
        for (ClusterPinId pin_id : cluster_ctx.clb_nlist.block_pins(bnum)) {
            ClusterNetId net_id = cluster_ctx.clb_nlist.pin_net(pin_id);
            if (cluster_ctx.clb_nlist.net_is_ignored(net_id))
                continue;
            if (cluster_ctx.clb_nlist.pin_type(pin_id) == PinType::DRIVER) {
                for (size_t ipin = 1; ipin < cluster_ctx.clb_nlist.net_pins(net_id).size(); ipin++) {
                    point_to_point_delay[net_id][ipin] = temp_point_to_point_delay[net_id][ipin];
                    temp_point_to_point_delay[net_id][ipin] = INVALID_DELAY;
                    point_to_point_timing_cost[net_id][ipin] = temp_point_to_point_timing_cost[net_id][ipin];
                    temp_point_to_point_timing_cost[net_id][ipin] = INVALID_DELAY;
                }
            } else {
                VTR_ASSERT_SAFE(cluster_ctx.clb_nlist.pin_type(pin_id) == PinType::SINK);
                if (!driven_by_moved_block(net_id, blocks_affected)) {
                    int net_pin = cluster_ctx.clb_nlist.pin_net_index(pin_id);
                    point_to_point_delay[net_id][net_pin] = temp_point_to_point_delay[net_id][net_pin];
                    temp_point_to_point_delay[net_id][net_pin] = INVALID_DELAY;
                    point_to_point_timing_cost[net_id][net_pin] = temp_point_to_point_timing_cost[net_id][net_pin];
                    temp_point_to_point_timing_cost[net_id][net_pin] = INVALID_DELAY;
                }
            }
        } 
    }     
}
static void update_td_cost ( const t_pl_blocks_to_be_moved & blocks_affected ) { auto & cluster_ctx = g_vpr_ctx . clustering ( ) ; for ( int iblk = 0 ; iblk < blocks_affected . num_moved_blocks ; iblk ++ ) { ClusterBlockId bnum = blocks_affected . moved_blocks [ iblk ] . block_num ; for ( ClusterPinId pin_id : cluster_ctx . clb_nlist . block_pins ( bnum ) ) { ClusterNetId net_id = cluster_ctx . clb_nlist . pin_net ( pin_id ) ; if ( cluster_ctx . clb_nlist . net_is_ignored ( net_id ) ) continue ; if ( cluster_ctx . clb_nlist . pin_type ( pin_id ) == PinType :: DRIVER ) { for ( size_t ipin = 1 ; ipin < cluster_ctx . clb_nlist . net_pins ( net_id ) . size ( ) ; ipin ++ ) { point_to_point_delay [ net_id ] [ ipin ] = temp_point_to_point_delay [ net_id ] [ ipin ] ; temp_point_to_point_delay [ net_id ] [ ipin ] = INVALID_DELAY ; point_to_point_timing_cost [ net_id ] [ ipin ] = temp_point_to_point_timing_cost [ net_id ] [ ipin ] ; temp_point_to_point_timing_cost [ net_id ] [ ipin ] = INVALID_DELAY ; } } else { VTR_ASSERT_SAFE ( cluster_ctx . clb_nlist . pin_type ( pin_id ) == PinType :: SINK ) ; if ( ! driven_by_moved_block ( net_id , blocks_affected ) ) { int net_pin = cluster_ctx . clb_nlist . pin_net_index ( pin_id ) ; point_to_point_delay [ net_id ] [ net_pin ] = temp_point_to_point_delay [ net_id ] [ net_pin ] ; temp_point_to_point_delay [ net_id ] [ net_pin ] = INVALID_DELAY ; point_to_point_timing_cost [ net_id ] [ net_pin ] = temp_point_to_point_timing_cost [ net_id ] [ net_pin ] ; temp_point_to_point_timing_cost [ net_id ] [ net_pin ] = INVALID_DELAY ; } } } } }
Update the point_to_point_timing_cost values from the temporary
 values for all connections that have changed.
Update the point_to_point_timing_cost values from the temporary values for all connections that have changed .
/* Go through all the blocks moved. */ //This net is being driven by a moved block, recompute //all point to point connections on this net. //This pin is a net sink on a moved block /* The following "if" prevents the value from being updated twice. */ /* Finished going through all the pins in the moved block */ /* Finished going through all the blocks moved */