/******************************************************************** * This file includes functions that outputs a configuration protocol to XML format *******************************************************************/ /* Headers from system goes first */ #include #include /* Headers from vtr util library */ #include "vtr_assert.h" #include "vtr_log.h" #include "openfpga_digest.h" /* Headers from readarchopenfpga library */ #include "write_xml_utils.h" #include "write_xml_config_protocol.h" /******************************************************************** * A writer to output a configuration memory organization to XML format *******************************************************************/ static void write_xml_config_organization(std::fstream& fp, const char* fname, const ConfigProtocol& config_protocol, const CircuitLibrary& circuit_lib) { /* Validate the file stream */ openfpga::check_file_stream(fname, fp); fp << "\t\t" << "" << "\n"; } /******************************************************************** * A writer to output a configuration protocol to XML format * Note: * This function should be run AFTER the function * link_config_protocol_to_circuit_library() *******************************************************************/ void write_xml_config_protocol(std::fstream& fp, const char* fname, const ConfigProtocol& config_protocol, const CircuitLibrary& circuit_lib) { /* Validate the file stream */ openfpga::check_file_stream(fname, fp); /* Write the root node */ fp << "\t" << "" << "\n"; /* Write configuration memory organization */ write_xml_config_organization(fp, fname, config_protocol, circuit_lib); /* Finish writing the root node */ fp << "\t" << "" << "\n"; }