openfpga/src/utils/device_rr_gsb_utils.cpp
/********************************************************************
 * This function aims to find out the number of GSBs
 *******************************************************************/
This function aims to find out the number of GSBs
This function aims to find out the number of GSBs
size_t find_device_rr_gsb_num_gsb_modules(const DeviceRRGSB& device_rr_gsb) {
  size_t counter = 0;
  for (size_t x = 0; x < device_rr_gsb.get_gsb_range().x(); ++x) { 
    for (size_t y = 0; y < device_rr_gsb.get_gsb_range().y(); ++y) { 
      if (true == device_rr_gsb.is_gsb_exist(vtr::Point<size_t>(x, y))) {
        counter++;
      }
    }
  }
  return counter;
}
size_t find_device_rr_gsb_num_gsb_modules ( const DeviceRRGSB & device_rr_gsb ) { size_t counter = 0 ; for ( size_t x = 0 ; x < device_rr_gsb . get_gsb_range ( ) . x ( ) ; ++ x ) { for ( size_t y = 0 ; y < device_rr_gsb . get_gsb_range ( ) . y ( ) ; ++ y ) { if ( true == device_rr_gsb . is_gsb_exist ( vtr :: Point < size_t > ( x , y ) ) ) { counter ++ ; } } } return counter ; }
This function aims to find out the number of GSBs
This function aims to find out the number of GSBs