openfpga/src/tile_direct/build_tile_direct.cpp
/********************************************************************
 * Find the coordinate of a grid in a specific column 
 * with a given type
 * This function will return the coordinate of the grid that satifies
 * the type requirement
 *******************************************************************/
Find the coordinate of a grid in a specific column
with a given type
This function will return the coordinate of the grid that satifies
the type requirement
Find the coordinate of a grid in a specific column with a given type This function will return the coordinate of the grid that satifies the type requirement
static 
vtr::Point<size_t> find_grid_coordinate_given_type(const DeviceGrid& grids,
                                                   const std::vector<vtr::Point<size_t>>& candidate_coords, 
                                                   const std::string& wanted_grid_type_name) {
  for (vtr::Point<size_t> coord : candidate_coords) {
    if (false == is_grid_coordinate_exist_in_device(grids, coord)) {
      continue;
    }
    if (wanted_grid_type_name == std::string(grids[coord.x()][coord.y()].type->name)) {
      return coord;
    }
  }
  return vtr::Point<size_t>(grids.width(), grids.height()); 
}
static vtr :: Point < size_t > find_grid_coordinate_given_type ( const DeviceGrid & grids , const std :: vector < vtr :: Point < size_t > > & candidate_coords , const std :: string & wanted_grid_type_name ) { for ( vtr :: Point < size_t > coord : candidate_coords ) { if ( false == is_grid_coordinate_exist_in_device ( grids , coord ) ) { continue ; } if ( wanted_grid_type_name == std :: string ( grids [ coord . x ( ) ] [ coord . y ( ) ] . type -> name ) ) { return coord ; } } return vtr :: Point < size_t > ( grids . width ( ) , grids . height ( ) ) ; }
Find the coordinate of a grid in a specific column
 with a given type
 This function will return the coordinate of the grid that satifies
 the type requirement
Find the coordinate of a grid in a specific column with a given type This function will return the coordinate of the grid that satifies the type requirement
/* If the next column is not longer in device range, we can return */ /* Return an valid coordinate */