vpr/src/place/place.cpp
/* Allocates and loads net_pin_indices array, this array allows us to quickly   *
 * find what pin on the net a block pin corresponds to. Returns the pointer   *
 * to the 2D net_pin_indices array.                                             */
Allocates and loads net_pin_indices array, this array allows us to quickly
find what pin on the net a block pin corresponds to. Returns the pointer
to the 2D net_pin_indices array.
Allocates and loads net_pin_indices array this array allows us to quickly find what pin on the net a block pin corresponds to . Returns the pointer to the 2D net_pin_indices array .
static void alloc_and_load_net_pin_indices() {
    unsigned int netpin;
    int max_pins_per_clb = 0;
    auto& device_ctx = g_vpr_ctx.device();
    auto& cluster_ctx = g_vpr_ctx.clustering();
    for (const auto& type : device_ctx.physical_tile_types)
        max_pins_per_clb = max(max_pins_per_clb, type.num_pins);
    net_pin_indices.resize(cluster_ctx.clb_nlist.blocks().size());
    for (auto blk_id : cluster_ctx.clb_nlist.blocks())
        net_pin_indices[blk_id].resize(max_pins_per_clb);
    for (auto net_id : cluster_ctx.clb_nlist.nets()) {
        if (cluster_ctx.clb_nlist.net_is_ignored(net_id))
            continue;
        netpin = 0;
        for (auto pin_id : cluster_ctx.clb_nlist.net_pins(net_id)) {
            int pin_index = cluster_ctx.clb_nlist.pin_logical_index(pin_id);
            ClusterBlockId block_id = cluster_ctx.clb_nlist.pin_block(pin_id);
            net_pin_indices[block_id][pin_index] = netpin;
            netpin++;
        }
    }
}
static void alloc_and_load_net_pin_indices ( ) { unsigned int netpin ; int max_pins_per_clb = 0 ; auto & device_ctx = g_vpr_ctx . device ( ) ; auto & cluster_ctx = g_vpr_ctx . clustering ( ) ; for ( const auto & type : device_ctx . physical_tile_types ) max_pins_per_clb = max ( max_pins_per_clb , type . num_pins ) ; net_pin_indices . resize ( cluster_ctx . clb_nlist . blocks ( ) . size ( ) ) ; for ( auto blk_id : cluster_ctx . clb_nlist . blocks ( ) ) net_pin_indices [ blk_id ] . resize ( max_pins_per_clb ) ; for ( auto net_id : cluster_ctx . clb_nlist . nets ( ) ) { if ( cluster_ctx . clb_nlist . net_is_ignored ( net_id ) ) continue ; netpin = 0 ; for ( auto pin_id : cluster_ctx . clb_nlist . net_pins ( net_id ) ) { int pin_index = cluster_ctx . clb_nlist . pin_logical_index ( pin_id ) ; ClusterBlockId block_id = cluster_ctx . clb_nlist . pin_block ( pin_id ) ; net_pin_indices [ block_id ] [ pin_index ] = netpin ; netpin ++ ; } } }
Allocates and loads net_pin_indices array, this array allows us to quickly
 find what pin on the net a block pin corresponds to.
Allocates and loads net_pin_indices array this array allows us to quickly find what pin on the net a block pin corresponds to .
/* Compute required size. */ /* Allocate for maximum size. */ /* Load the values */