vpr/src/pack/cluster.cpp
/* Resets nets used at different pin classes for determining pin feasibility */
Resets nets used at different pin classes for determining pin feasibility
Resets nets used at different pin classes for determining pin feasibility
static void reset_lookahead_pins_used(t_pb* cur_pb) {
    int i, j;
    const t_pb_type* pb_type = cur_pb->pb_graph_node->pb_type;
    if (cur_pb->pb_stats == nullptr) {
        return; 
    }
    if (pb_type->num_modes > 0 && cur_pb->name != nullptr) {
        for (i = 0; i < cur_pb->pb_graph_node->num_input_pin_class; i++) {
            cur_pb->pb_stats->lookahead_input_pins_used[i].clear();
        }
        for (i = 0; i < cur_pb->pb_graph_node->num_output_pin_class; i++) {
            cur_pb->pb_stats->lookahead_output_pins_used[i].clear();
        }
        if (cur_pb->child_pbs != nullptr) {
            for (i = 0; i < pb_type->modes[cur_pb->mode].num_pb_type_children; i++) {
                if (cur_pb->child_pbs[i] != nullptr) {
                    for (j = 0; j < pb_type->modes[cur_pb->mode].pb_type_children[i].num_pb; j++) {
                        reset_lookahead_pins_used(&cur_pb->child_pbs[i][j]);
                    }
                }
            }
        }
    }
}
static void reset_lookahead_pins_used ( t_pb * cur_pb ) { int i , j ; const t_pb_type * pb_type = cur_pb -> pb_graph_node -> pb_type ; if ( cur_pb -> pb_stats == nullptr ) { return ; } if ( pb_type -> num_modes > 0 && cur_pb -> name != nullptr ) { for ( i = 0 ; i < cur_pb -> pb_graph_node -> num_input_pin_class ; i ++ ) { cur_pb -> pb_stats -> lookahead_input_pins_used [ i ] . clear ( ) ; } for ( i = 0 ; i < cur_pb -> pb_graph_node -> num_output_pin_class ; i ++ ) { cur_pb -> pb_stats -> lookahead_output_pins_used [ i ] . clear ( ) ; } if ( cur_pb -> child_pbs != nullptr ) { for ( i = 0 ; i < pb_type -> modes [ cur_pb -> mode ] . num_pb_type_children ; i ++ ) { if ( cur_pb -> child_pbs [ i ] != nullptr ) { for ( j = 0 ; j < pb_type -> modes [ cur_pb -> mode ] . pb_type_children [ i ] . num_pb ; j ++ ) { reset_lookahead_pins_used ( & cur_pb -> child_pbs [ i ] [ j ] ) ; } } } } } }
Resets nets used at different pin classes for determining pin feasibility
Resets nets used at different pin classes for determining pin feasibility
/* No pins used, no need to continue */