vpr/src/route/rr_graph_reader.cpp
/* Grid was initialized from the architecture file. This function checks
 * if it corresponds to the RR graph. Errors out if it doesn't correspond*/
Grid was initialized from the architecture file. This function checks
if it corresponds to the RR graph. Errors out if it doesn't correspond
Grid was initialized from the architecture file . This function checks if it corresponds to the RR graph . Errors out if it doesn ' t correspond
void verify_grid(pugi::xml_node parent, const pugiutil::loc_data& loc_data, const DeviceGrid& grid) {
    pugi::xml_node grid_node;
    int num_grid_node = count_children(parent, "grid_loc", loc_data);
    grid_node = get_first_child(parent, "grid_loc", loc_data);
    for (int i = 0; i < num_grid_node; i++) {
        int x = get_attribute(grid_node, "x", loc_data).as_float();
        int y = get_attribute(grid_node, "y", loc_data).as_float();
        const t_grid_tile& grid_tile = grid[x][y];
        if (grid_tile.type->index != get_attribute(grid_node, "block_type_id", loc_data).as_int(0)) {
            VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                            "Architecture file does not match RR graph's block_type_id at (%d, %d): arch used ID %d, RR graph used ID %d.", x, y,
                            (grid_tile.type->index), get_attribute(grid_node, "block_type_id", loc_data).as_int(0));
        }
        if (grid_tile.width_offset != get_attribute(grid_node, "width_offset", loc_data).as_float(0)) {
            VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                            "Architecture file does not match RR graph's width_offset at (%d, %d)", x, y);
        }
        if (grid_tile.height_offset != get_attribute(grid_node, "height_offset", loc_data).as_float(0)) {
            VPR_FATAL_ERROR(VPR_ERROR_OTHER,
                            "Architecture file does not match RR graph's height_offset at (%d, %d)", x, y);
        }
        grid_node = grid_node.next_sibling(grid_node.name());
    }
}
void verify_grid ( pugi :: xml_node parent , const pugiutil :: loc_data & loc_data , const DeviceGrid & grid ) { pugi :: xml_node grid_node ; int num_grid_node = count_children ( parent , " " , loc_data ) ; grid_node = get_first_child ( parent , " " , loc_data ) ; for ( int i = 0 ; i < num_grid_node ; i ++ ) { int x = get_attribute ( grid_node , " " , loc_data ) . as_float ( ) ; int y = get_attribute ( grid_node , " " , loc_data ) . as_float ( ) ; const t_grid_tile & grid_tile = grid [ x ] [ y ] ; if ( grid_tile . type -> index != get_attribute ( grid_node , " " , loc_data ) . as_int ( 0 ) ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " , x , y , ( grid_tile . type -> index ) , get_attribute ( grid_node , " " , loc_data ) . as_int ( 0 ) ) ; } if ( grid_tile . width_offset != get_attribute ( grid_node , " " , loc_data ) . as_float ( 0 ) ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " , x , y ) ; } if ( grid_tile . height_offset != get_attribute ( grid_node , " " , loc_data ) . as_float ( 0 ) ) { VPR_FATAL_ERROR ( VPR_ERROR_OTHER , " " , x , y ) ; } grid_node = grid_node . next_sibling ( grid_node . name ( ) ) ; } }
Grid was initialized from the architecture file.
Grid was initialized from the architecture file .