vpr/src/place/place.cpp
/*returns the delay of one point to point connection */
returns the delay of one point to point connection
returns the delay of one point to point connection
static float comp_td_point_to_point_delay(const PlaceDelayModel* delay_model, ClusterNetId net_id, int ipin) {
    auto& cluster_ctx = g_vpr_ctx.clustering();
    auto& place_ctx = g_vpr_ctx.placement();
    float delay_source_to_sink = 0.;
    if (!cluster_ctx.clb_nlist.net_is_ignored(net_id)) {
        ClusterPinId source_pin = cluster_ctx.clb_nlist.net_driver(net_id);
        ClusterPinId sink_pin = cluster_ctx.clb_nlist.net_pin(net_id, ipin);
        ClusterBlockId source_block = cluster_ctx.clb_nlist.pin_block(source_pin);
        ClusterBlockId sink_block = cluster_ctx.clb_nlist.pin_block(sink_pin);
        int source_block_ipin = cluster_ctx.clb_nlist.pin_logical_index(source_pin);
        int sink_block_ipin = cluster_ctx.clb_nlist.pin_logical_index(sink_pin);
        int source_x = place_ctx.block_locs[source_block].loc.x;
        int source_y = place_ctx.block_locs[source_block].loc.y;
        int sink_x = place_ctx.block_locs[sink_block].loc.x;
        int sink_y = place_ctx.block_locs[sink_block].loc.y;
        delay_source_to_sink = delay_model->delay(source_x,
                                                  source_y,
                                                  source_block_ipin,
                                                  sink_x,
                                                  sink_y,
                                                  sink_block_ipin);
        if (delay_source_to_sink < 0) {
            VPR_ERROR(VPR_ERROR_PLACE,
                      "in comp_td_point_to_point_delay: Bad delay_source_to_sink value %g from %s (at %d,%d) to %s (at %d,%d)\n"
                      "in comp_td_point_to_point_delay: Delay is less than 0\n",
                      block_type_pin_index_to_name(physical_tile_type(source_block), source_block_ipin).c_str(),
                      source_x, source_y,
                      block_type_pin_index_to_name(physical_tile_type(sink_block), sink_block_ipin).c_str(),
                      sink_x, sink_y,
                      delay_source_to_sink);
        }
    }
    return (delay_source_to_sink);
}
static float comp_td_point_to_point_delay ( const PlaceDelayModel * delay_model , ClusterNetId net_id , int ipin ) { auto & cluster_ctx = g_vpr_ctx . clustering ( ) ; auto & place_ctx = g_vpr_ctx . placement ( ) ; float delay_source_to_sink = 0. ; if ( ! cluster_ctx . clb_nlist . net_is_ignored ( net_id ) ) { ClusterPinId source_pin = cluster_ctx . clb_nlist . net_driver ( net_id ) ; ClusterPinId sink_pin = cluster_ctx . clb_nlist . net_pin ( net_id , ipin ) ; ClusterBlockId source_block = cluster_ctx . clb_nlist . pin_block ( source_pin ) ; ClusterBlockId sink_block = cluster_ctx . clb_nlist . pin_block ( sink_pin ) ; int source_block_ipin = cluster_ctx . clb_nlist . pin_logical_index ( source_pin ) ; int sink_block_ipin = cluster_ctx . clb_nlist . pin_logical_index ( sink_pin ) ; int source_x = place_ctx . block_locs [ source_block ] . loc . x ; int source_y = place_ctx . block_locs [ source_block ] . loc . y ; int sink_x = place_ctx . block_locs [ sink_block ] . loc . x ; int sink_y = place_ctx . block_locs [ sink_block ] . loc . y ; delay_source_to_sink = delay_model -> delay ( source_x , source_y , source_block_ipin , sink_x , sink_y , sink_block_ipin ) ; if ( delay_source_to_sink < 0 ) { VPR_ERROR ( VPR_ERROR_PLACE , " \n " " \n " , block_type_pin_index_to_name ( physical_tile_type ( source_block ) , source_block_ipin ) . c_str ( ) , source_x , source_y , block_type_pin_index_to_name ( physical_tile_type ( sink_block ) , sink_block_ipin ) . c_str ( ) , sink_x , sink_y , delay_source_to_sink ) ; } } return ( delay_source_to_sink ) ; }
returns the delay of one point to point connection
returns the delay of one point to point connection
//Only estimate delay for signals routed through the inter-block //routing network. TODO: Do how should we compute the delay for globals. "Global signals are assumed to have zero delay." /* Note: This heuristic only considers delta_x and delta_y, a much better heuristic
         *       would be to to create a more comprehensive lookup table.
         *
         *       In particular this aproach does not accurately capture the effect of fast
         *       carry-chain connections.
         */