vpr/src/tileable_rr_graph/rr_graph_builder_utils.cpp
/************************************************************************
 * Identify if a X-direction routing channel is at the right side of a 
 * multi-height grid
 *
 *     +-----------------+
 *     |                 |
 *     |                 |  +-------------+
 *     |      Grid       |  |   CHANX     |
 *     |    [x-1][y]     |  |   [x][y]    |
 *     |                 |  +-------------+
 *     |                 |
 *     +-----------------+
 ***********************************************************************/
Identify if a X-direction routing channel is at the right side of a
multi-height grid


Identify if a X - direction routing channel is at the right side of a multi - height grid
bool is_chanx_right_to_multi_height_grid(const DeviceGrid& grids,
                                         const vtr::Point<size_t>& chanx_coord,
                                         const bool& through_channel) {
  VTR_ASSERT(0 < chanx_coord.x());
  if (1 == chanx_coord.x()) {
    return true;
  }
  if (false == through_channel) {
    vtr::Point<size_t> left_chanx_coord(chanx_coord.x() - 1, chanx_coord.y());
    if (false == is_chanx_exist(grids, left_chanx_coord)) {
      return true;
    }
  }
  return false;
}
bool is_chanx_right_to_multi_height_grid ( const DeviceGrid & grids , const vtr :: Point < size_t > & chanx_coord , const bool & through_channel ) { VTR_ASSERT ( 0 < chanx_coord . x ( ) ) ; if ( 1 == chanx_coord . x ( ) ) { return true ; } if ( false == through_channel ) { vtr :: Point < size_t > left_chanx_coord ( chanx_coord . x ( ) - 1 , chanx_coord . y ( ) ) ; if ( false == is_chanx_exist ( grids , left_chanx_coord ) ) { return true ; } } return false ; }
Identify if a X-direction routing channel is at the right side of a
 multi-height grid
Identify if a X - direction routing channel is at the right side of a multi - height grid
/* This is already the LEFT side of FPGA fabric,
     * it is the same results as chanx is right to a multi-height grid
     */ /* We check the left neighbor of chanx, if it does not exist, the chanx is left to a multi-height grid */