vpr/src/pack/cluster.cpp
/**
 * This function returns the pb_type that is similar to Logic Element (LE) in an FPGA
 * The LE is defined as a physical block that contains a LUT primitive and
 * is found by searching a cluster type to find the first pb_type (from the top
 * of the hierarchy clb->LE) that has more than one instance within the cluster.
 */
This function returns the pb_type that is similar to Logic Element (LE) in an FPGA
The LE is defined as a physical block that contains a LUT primitive and
is found by searching a cluster type to find the first pb_type (from the top
of the hierarchy clb->LE) that has more than one instance within the cluster.
This function returns the pb_type that is similar to Logic Element ( LE ) in an FPGA The LE is defined as a physical block that contains a LUT primitive and is found by searching a cluster type to find the first pb_type ( from the top of the hierarchy clb - > LE ) that has more than one instance within the cluster .
static t_pb_type* identify_le_block_type(t_logical_block_type_ptr logic_block_type) {
    if (!logic_block_type)
        return nullptr;
    auto pb_graph_node = logic_block_type->pb_graph_head;
    while (pb_graph_node->child_pb_graph_nodes) {
        if (pb_graph_node->pb_type->num_modes > 1 || pb_graph_node->pb_type->modes[0].num_pb_type_children > 1)
            return nullptr;
        pb_graph_node = &pb_graph_node->child_pb_graph_nodes[0][0][0];
        if (pb_graph_node->pb_type->num_pb > 1)
            return pb_graph_node->pb_type;
    }
    return nullptr;
}
static t_pb_type * identify_le_block_type ( t_logical_block_type_ptr logic_block_type ) { if ( ! logic_block_type ) return nullptr ; auto pb_graph_node = logic_block_type -> pb_graph_head ; while ( pb_graph_node -> child_pb_graph_nodes ) { if ( pb_graph_node -> pb_type -> num_modes > 1 || pb_graph_node -> pb_type -> modes [ 0 ] . num_pb_type_children > 1 ) return nullptr ; pb_graph_node = & pb_graph_node -> child_pb_graph_nodes [ 0 ] [ 0 ] [ 0 ] ; if ( pb_graph_node -> pb_type -> num_pb > 1 ) return pb_graph_node -> pb_type ; } return nullptr ; }
This function returns the pb_type that is similar to Logic Element (LE) in an FPGA
 The LE is defined as a physical block that contains a LUT primitive and
 is found by searching a cluster type to find the first pb_type (from the top
 of the hierarchy clb->LE) that has more than one instance within the cluster.
This function returns the pb_type that is similar to Logic Element ( LE ) in an FPGA The LE is defined as a physical block that contains a LUT primitive and is found by searching a cluster type to find the first pb_type ( from the top of the hierarchy clb - > LE ) that has more than one instance within the cluster .
// if there is no CLB-like cluster, then there is no LE pb_block // search down the hierarchy starting from the pb_graph_head // if this pb_graph_node has more than one mode or more than one pb_type in the default mode return // nullptr since the logic block of this architecture is not a CLB-like logic block // explore the only child of this pb_graph_node // if the child node has more than one instance in the // cluster then this is the pb_type similar to a LE