vpr/src/tileable_rr_graph/rr_graph_builder_utils.cpp
/************************************************************************
 * Idenfity if a Y-direction routing channel exist in the fabric
 * This could be entirely possible that a routig channel
 * is in the middle of a multi-width and multi-height grid
 *
 * As the chany always locates on right of a grid with the same coord
 *
 * +-----------+  +---------+  +--------+
 * |   Grid    |  |  Grid   |  |  CHANY |
 * | [x-1][y]  |  | [x][y]  |  | [x][y] |
 * +-----------+  +---------+  +--------+
 *  width_offset   width_offset
 *  = width - 2   = width -1
 *  If the CHANY is in the middle of a multi-width and multi-height grid
 *  it should locate at a grid whose width_offset is lower than the its width defined in physical_tile
 *  When height_offset == height - 1, it means that the grid is at the top side of this multi-width and multi-height block
 *
 *  If through channel is allowed, the chany will always exists
 *  unless it falls out of the grid array
 ***********************************************************************/
Idenfity if a Y-direction routing channel exist in the fabric
This could be entirely possible that a routig channel
is in the middle of a multi-width and multi-height grid

As the chany always locates on right of a grid with the same coord



If through channel is allowed, the chany will always exists
unless it falls out of the grid array
Idenfity if a Y - direction routing channel exist in the fabric This could be entirely possible that a routig channel is in the middle of a multi - width and multi - height grid As the chany always locates on right of a grid with the same coord If through channel is allowed the chany will always exists unless it falls out of the grid array
bool is_chany_exist(const DeviceGrid& grids,
                    const vtr::Point<size_t>& chany_coord,
                    const bool& through_channel) {
  if (chany_coord.x() > grids.width() - 2) {
    return false;
  }
  if ((1 > chany_coord.y()) || (chany_coord.y() > grids.height() - 2)) {
    return false;
  }
  if (true == through_channel) {
    return true;
  }
  return (grids[chany_coord.x()][chany_coord.y()].width_offset == grids[chany_coord.x()][chany_coord.y()].type->width - 1);
}
bool is_chany_exist ( const DeviceGrid & grids , const vtr :: Point < size_t > & chany_coord , const bool & through_channel ) { if ( chany_coord . x ( ) > grids . width ( ) - 2 ) { return false ; } if ( ( 1 > chany_coord . y ( ) ) || ( chany_coord . y ( ) > grids . height ( ) - 2 ) ) { return false ; } if ( true == through_channel ) { return true ; } return ( grids [ chany_coord . x ( ) ] [ chany_coord . y ( ) ] . width_offset == grids [ chany_coord . x ( ) ] [ chany_coord . y ( ) ] . type -> width - 1 ) ; }
Idenfity if a Y-direction routing channel exist in the fabric
 This could be entirely possible that a routig channel
 is in the middle of a multi-width and multi-height grid
Idenfity if a Y - direction routing channel exist in the fabric This could be entirely possible that a routig channel is in the middle of a multi - width and multi - height grid