vpr/src/tileable_rr_graph/rr_graph_builder_utils.cpp
/************************************************************************
 * Identify if a Y-direction routing channel is at the top side of a 
 * multi-width grid
 * 
 *          +--------+
 *          | CHANY  |
 *          | [x][y] | 
 *          +--------+
 *
 *     +-----------------+
 *     |                 |
 *     |                 | 
 *     |      Grid       | 
 *     |    [x-1][y]     | 
 *     |                 | 
 *     |                 |
 *     +-----------------+
 ***********************************************************************/
Identify if a Y-direction routing channel is at the top side of a
multi-width grid




Identify if a Y - direction routing channel is at the top side of a multi - width grid
bool is_chany_top_to_multi_width_grid(const DeviceGrid& grids,
                                      const vtr::Point<size_t>& chany_coord,
                                      const bool& through_channel) {
  VTR_ASSERT(0 < chany_coord.y());
  if (1 == chany_coord.y()) {
    return true;
  }
  if (false == through_channel) {
    vtr::Point<size_t> bottom_chany_coord(chany_coord.x(), chany_coord.y() - 1);
    if (false == is_chany_exist(grids, bottom_chany_coord)) {
      return true;
    }
  }
  return false;
}
bool is_chany_top_to_multi_width_grid ( const DeviceGrid & grids , const vtr :: Point < size_t > & chany_coord , const bool & through_channel ) { VTR_ASSERT ( 0 < chany_coord . y ( ) ) ; if ( 1 == chany_coord . y ( ) ) { return true ; } if ( false == through_channel ) { vtr :: Point < size_t > bottom_chany_coord ( chany_coord . x ( ) , chany_coord . y ( ) - 1 ) ; if ( false == is_chany_exist ( grids , bottom_chany_coord ) ) { return true ; } } return false ; }
Identify if a Y-direction routing channel is at the top side of a
 multi-width grid
Identify if a Y - direction routing channel is at the top side of a multi - width grid
/* This is already the BOTTOM side of FPGA fabric,
     * it is the same results as chany is at the top of a multi-width grid
     */ /* We check the bottom neighbor of chany, if it does not exist, the chany is top to a multi-height grid */