openfpga/src/annotation/check_pb_type_annotation.cpp
void check_vpr_physical_pb_mode_annotation(const DeviceContext& vpr_device_ctx, 
                                           const VprDeviceAnnotation& vpr_device_annotation) {
  size_t num_err = 0;

  for (const t_logical_block_type& lb_type : vpr_device_ctx.logical_block_types) {
    /* By pass nullptr for pb_type head */
    if (nullptr == lb_type.pb_type) {
      continue;
    }
    /* Top pb_type should always has a physical mode! */
    rec_check_vpr_physical_pb_mode_annotation(lb_type.pb_type, true, vpr_device_annotation, num_err);
  }
  if (0 == num_err) {
    VTR_LOG("Check physical mode annotation for pb_types passed.\n");
  } else {
    VTR_LOG_ERROR("Check physical mode annotation for pb_types failed with %ld errors!\n",
                  num_err);
  }
}
/********************************************************************
 * This function will check the physical mode annotation for
 * each pb_type in the device
 *******************************************************************/
This function will check the physical mode annotation for
each pb_type in the device
This function will check the physical mode annotation for each pb_type in the device
void check_vpr_physical_pb_mode_annotation(const DeviceContext& vpr_device_ctx, 
                                           const VprDeviceAnnotation& vpr_device_annotation) {
  size_t num_err = 0;
  for (const t_logical_block_type& lb_type : vpr_device_ctx.logical_block_types) {
    if (nullptr == lb_type.pb_type) {
      continue;
    }
    rec_check_vpr_physical_pb_mode_annotation(lb_type.pb_type, true, vpr_device_annotation, num_err);
  }
  if (0 == num_err) {
    VTR_LOG("Check physical mode annotation for pb_types passed.\n");
  } else {
    VTR_LOG_ERROR("Check physical mode annotation for pb_types failed with %ld errors!\n",
                  num_err);
  }
}
void check_vpr_physical_pb_mode_annotation ( const DeviceContext & vpr_device_ctx , const VprDeviceAnnotation & vpr_device_annotation ) { size_t num_err = 0 ; for ( const t_logical_block_type & lb_type : vpr_device_ctx . logical_block_types ) { if ( nullptr == lb_type . pb_type ) { continue ; } rec_check_vpr_physical_pb_mode_annotation ( lb_type . pb_type , true , vpr_device_annotation , num_err ) ; } if ( 0 == num_err ) { VTR_LOG ( " \n " ) ; } else { VTR_LOG_ERROR ( " \n " , num_err ) ; } }
This function will check the physical mode annotation for
 each pb_type in the device
This function will check the physical mode annotation for each pb_type in the device
/* By pass nullptr for pb_type head */ /* Top pb_type should always has a physical mode! */