openfpga/src/utils/device_rr_gsb_utils.cpp
/********************************************************************
 * This function aims to find out the number of connection block
 * modules in the device rr_gsb array
 *******************************************************************/
This function aims to find out the number of connection block
modules in the device rr_gsb array
This function aims to find out the number of connection block modules in the device rr_gsb array
size_t find_device_rr_gsb_num_cb_modules(const DeviceRRGSB& device_rr_gsb,
                                         const t_rr_type& cb_type) {
  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) { 
      const RRGSB& rr_gsb = device_rr_gsb.get_gsb(x, y);
      if (true == rr_gsb.is_cb_exist(cb_type)) {
        counter++;
      }
    }
  }
  return counter;
}
size_t find_device_rr_gsb_num_cb_modules ( const DeviceRRGSB & device_rr_gsb , const t_rr_type & cb_type ) { 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 ) { const RRGSB & rr_gsb = device_rr_gsb . get_gsb ( x , y ) ; if ( true == rr_gsb . is_cb_exist ( cb_type ) ) { counter ++ ; } } } return counter ; }
This function aims to find out the number of connection block
 modules in the device rr_gsb array
This function aims to find out the number of connection block modules in the device rr_gsb array