vpr/src/route/rr_graph_reader.cpp
/* Segments was initialized already. This function checks
 * if it corresponds to the RR graph. Errors out if it doesn't correspond*/
Segments was initialized already. This function checks
if it corresponds to the RR graph. Errors out if it doesn't correspond
Segments was initialized already . This function checks if it corresponds to the RR graph . Errors out if it doesn ' t correspond
void verify_segments(pugi::xml_node parent, const pugiutil::loc_data& loc_data, const std::vector<t_segment_inf>& segment_inf) {
    pugi::xml_node Segment, subnode;
    Segment = get_first_child(parent, "segment", loc_data);
    while (Segment) {
        int segNum = get_attribute(Segment, "id", loc_data).as_int();
        const char* name = get_attribute(Segment, "name", loc_data).as_string();
        if (strcmp(segment_inf[segNum].name.c_str(), name) != 0) {
            VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                            "Architecture file does not match RR graph's segment name: arch uses %s, RR graph uses %s", segment_inf[segNum].name.c_str(), name);
        }
        subnode = get_single_child(parent, "timing", loc_data, pugiutil::OPTIONAL);
        if (subnode) {
            if (segment_inf[segNum].Rmetal != get_attribute(subnode, "R_per_meter", loc_data).as_float(0)) {
                VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                                "Architecture file does not match RR graph's segment R_per_meter");
            }
            if (segment_inf[segNum].Cmetal != get_attribute(subnode, "C_per_meter", loc_data).as_float(0)) {
                VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                                "Architecture file does not match RR graph's segment C_per_meter");
            }
        }
        Segment = Segment.next_sibling(Segment.name());
    }
}
void verify_segments ( pugi :: xml_node parent , const pugiutil :: loc_data & loc_data , const std :: vector < t_segment_inf > & segment_inf ) { pugi :: xml_node Segment , subnode ; Segment = get_first_child ( parent , " " , loc_data ) ; while ( Segment ) { int segNum = get_attribute ( Segment , " " , loc_data ) . as_int ( ) ; const char * name = get_attribute ( Segment , " " , loc_data ) . as_string ( ) ; if ( strcmp ( segment_inf [ segNum ] . name . c_str ( ) , name ) != 0 ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " , segment_inf [ segNum ] . name . c_str ( ) , name ) ; } subnode = get_single_child ( parent , " " , loc_data , pugiutil :: OPTIONAL ) ; if ( subnode ) { if ( segment_inf [ segNum ] . Rmetal != get_attribute ( subnode , " " , loc_data ) . as_float ( 0 ) ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " ) ; } if ( segment_inf [ segNum ] . Cmetal != get_attribute ( subnode , " " , loc_data ) . as_float ( 0 ) ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " ) ; } } Segment = Segment . next_sibling ( Segment . name ( ) ) ; } }
Segments was initialized already.
Segments was initialized already .