vpr/src/device/write_xml_rr_graph_obj.cpp
/* All relevant rr node info is written out to the graph.
 * This includes location, timing, and segment info
 */
All relevant rr node info is written out to the graph.
This includes location, timing, and segment info
All relevant rr node info is written out to the graph . This includes location timing and segment info
static 
void write_rr_graph_node(fstream &fp, const RRGraph& rr_graph) {
  auto& device_ctx = g_vpr_ctx.device();
  fp << "\t<rr_nodes>" << endl;
  for (auto node : rr_graph.nodes()) {
    fp << "\t\t<node";
    fp << " id=\"" << rr_graph.node_index(node);
    fp << "\" type=\"" << rr_node_typename[rr_graph.node_type(node)];
    if (CHANX == rr_graph.node_type(node) || CHANY == rr_graph.node_type(node)) {
      fp << "\" direction=\"" << DIRECTION_STRING_WRITE_XML[rr_graph.node_direction(node)];
    }
    fp << "\" capacity=\"" << rr_graph.node_capacity(node);
    fp << "\">" << endl;
    fp << "\t\t\t<loc";
    fp << " xlow=\"" << rr_graph.node_xlow(node);
    fp << "\" ylow=\"" << rr_graph.node_ylow(node);
    fp << "\" xhigh=\"" << rr_graph.node_xhigh(node);
    fp << "\" yhigh=\"" << rr_graph.node_yhigh(node);
    if (IPIN == rr_graph.node_type(node) || OPIN == rr_graph.node_type(node)) {
      fp << "\" side=\"" << SIDE_STRING[rr_graph.node_side(node)];
    }
    fp << "\" ptc=\"" << rr_graph.node_ptc_num(node) ;
    fp << "\"/>" << endl;
    fp << "\t\t\t<timing R=\"" << setprecision(FLOAT_PRECISION) << rr_graph.node_R(node)
            << "\" C=\"" << setprecision(FLOAT_PRECISION) << rr_graph.node_C(node) << "\"/>" << endl;
    if (RRSegmentId::INVALID() != rr_graph.node_segment(node)) {
      fp << "\t\t\t<segment segment_id=\"" << size_t(rr_graph.node_segment(node)) << "\"/>" << endl;
    }
    const auto iter = device_ctx.rr_node_metadata.find(rr_graph.node_index(node));
    if(iter != device_ctx.rr_node_metadata.end()) {
      const t_metadata_dict & meta = iter->second;
      add_metadata_to_xml(fp, "\t\t\t", meta);
    }
    fp << "\t\t</node>" << endl;
  }
  fp << "\t</rr_nodes>" << endl << endl;
  return;
}
static void write_rr_graph_node ( fstream & fp , const RRGraph & rr_graph ) { auto & device_ctx = g_vpr_ctx . device ( ) ; fp << " \t " << endl ; for ( auto node : rr_graph . nodes ( ) ) { fp << " \t \t " ; fp << " \" " << rr_graph . node_index ( node ) ; fp << " \" \" " << rr_node_typename [ rr_graph . node_type ( node ) ] ; if ( CHANX == rr_graph . node_type ( node ) || CHANY == rr_graph . node_type ( node ) ) { fp << " \" \" " << DIRECTION_STRING_WRITE_XML [ rr_graph . node_direction ( node ) ] ; } fp << " \" \" " << rr_graph . node_capacity ( node ) ; fp << " \" " << endl ; fp << " \t \t \t " ; fp << " \" " << rr_graph . node_xlow ( node ) ; fp << " \" \" " << rr_graph . node_ylow ( node ) ; fp << " \" \" " << rr_graph . node_xhigh ( node ) ; fp << " \" \" " << rr_graph . node_yhigh ( node ) ; if ( IPIN == rr_graph . node_type ( node ) || OPIN == rr_graph . node_type ( node ) ) { fp << " \" \" " << SIDE_STRING [ rr_graph . node_side ( node ) ] ; } fp << " \" \" " << rr_graph . node_ptc_num ( node ) ; fp << " \" " << endl ; fp << " \t \t \t \" " << setprecision ( FLOAT_PRECISION ) << rr_graph . node_R ( node ) << " \" \" " << setprecision ( FLOAT_PRECISION ) << rr_graph . node_C ( node ) << " \" " << endl ; if ( RRSegmentId :: INVALID ( ) != rr_graph . node_segment ( node ) ) { fp << " \t \t \t \" " << size_t ( rr_graph . node_segment ( node ) ) << " \" " << endl ; } const auto iter = device_ctx . rr_node_metadata . find ( rr_graph . node_index ( node ) ) ; if ( iter != device_ctx . rr_node_metadata . end ( ) ) { const t_metadata_dict & meta = iter -> second ; add_metadata_to_xml ( fp , " \t \t \t " , meta ) ; } fp << " \t \t " << endl ; } fp << " \t " << endl << endl ; return ; }
All relevant rr node info is written out to the graph.
All relevant rr node info is written out to the graph .
/* TODO: we should make it function full independent from device_ctx !!! */