libopenfpga/libarchopenfpga/src/read_xml_openfpga_arch.cpp
/********************************************************************
 * Top-level function to parse an XML file and load data to bitstream settings
 *******************************************************************/
Top-level function to parse an XML file and load data to bitstream settings
Top - level function to parse an XML file and load data to bitstream settings
openfpga::BitstreamSetting read_xml_openfpga_bitstream_settings(const char* bitstream_setting_file_name) {
  vtr::ScopedStartFinishTimer timer("Read OpenFPGA bitstream settings");
  openfpga::BitstreamSetting openfpga_bitstream_setting;
  pugi::xml_node Next;
  pugi::xml_document doc;
  pugiutil::loc_data loc_data;
  try {
    loc_data = pugiutil::load_xml(doc, bitstream_setting_file_name);
    auto xml_bitstream_settings = get_single_child(doc, "openfpga_bitstream_setting", loc_data); 
    openfpga_bitstream_setting = read_xml_bitstream_setting(xml_bitstream_settings, loc_data);
  } catch (pugiutil::XmlError& e) {
    archfpga_throw(bitstream_setting_file_name, e.line(),
                   "%s", e.what());
  }
  return openfpga_bitstream_setting; 
}
openfpga :: BitstreamSetting read_xml_openfpga_bitstream_settings ( const char * bitstream_setting_file_name ) { vtr :: ScopedStartFinishTimer timer ( " " ) ; openfpga :: BitstreamSetting openfpga_bitstream_setting ; pugi :: xml_node Next ; pugi :: xml_document doc ; pugiutil :: loc_data loc_data ; try { loc_data = pugiutil :: load_xml ( doc , bitstream_setting_file_name ) ; auto xml_bitstream_settings = get_single_child ( doc , " " , loc_data ) ; openfpga_bitstream_setting = read_xml_bitstream_setting ( xml_bitstream_settings , loc_data ) ; } catch ( pugiutil :: XmlError & e ) { archfpga_throw ( bitstream_setting_file_name , e . line ( ) , " " , e . what ( ) ) ; } return openfpga_bitstream_setting ; }
Top-level function to parse an XML file and load data to bitstream settings
Top - level function to parse an XML file and load data to bitstream settings
/* Parse the file */ /* Second node should be <openfpga_simulation_setting> */ /* Parse simulation settings to data structure */