openfpga/src/annotation/check_pb_graph_annotation.cpp
/********************************************************************
 * Check each primitive pb_graph_node
 * - It has been binded to an physical pb_graph_node
 * - Each pin has been binded to a physical pb_graph_node pin
 *******************************************************************/
Check each primitive pb_graph_node
- It has been binded to an physical pb_graph_node
- Each pin has been binded to a physical pb_graph_node pin
Check each primitive pb_graph_node - It has been binded to an physical pb_graph_node - Each pin has been binded to a physical pb_graph_node pin
void check_physical_pb_graph_node_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_graph_head) {
      continue;
    }
    rec_check_vpr_physical_pb_graph_node_annotation(lb_type.pb_graph_head, vpr_device_annotation, num_err); 
  }
  if (0 == num_err) {
    VTR_LOG("Check pb_graph annotation for physical nodes and pins passed.\n");
  } else {
    VTR_LOG_ERROR("Check pb_graph annotation for physical nodes and pins failed with %ld errors!\n",
                  num_err);
  }
}
void check_physical_pb_graph_node_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_graph_head ) { continue ; } rec_check_vpr_physical_pb_graph_node_annotation ( lb_type . pb_graph_head , vpr_device_annotation , num_err ) ; } if ( 0 == num_err ) { VTR_LOG ( " \n " ) ; } else { VTR_LOG_ERROR ( " \n " , num_err ) ; } }
Check each primitive pb_graph_node
 - It has been binded to an physical pb_graph_node
 - Each pin has been binded to a physical pb_graph_node pin
Check each primitive pb_graph_node - It has been binded to an physical pb_graph_node - Each pin has been binded to a physical pb_graph_node pin
/* By pass nullptr for pb_graph head */