move OpenFPGAArch to openfpga namespace
This commit is contained in:
parent
d6adfa0821
commit
f7a7c56366
|
@ -3,11 +3,16 @@
|
|||
|
||||
#include "circuit_library.h"
|
||||
|
||||
/* namespace openfpga begins */
|
||||
namespace openfpga {
|
||||
|
||||
/* A unified data structure to store circuit-level settings,
|
||||
* including circuit library, technology library and simulation parameters
|
||||
*/
|
||||
struct OpenFPGAArch {
|
||||
struct Arch {
|
||||
CircuitLibrary circuit_lib;
|
||||
};
|
||||
|
||||
} /* namespace openfpga ends */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* Top-level function to parse an XML file and load data to :
|
||||
* 1. circuit library
|
||||
*******************************************************************/
|
||||
OpenFPGAArch read_xml_openfpga_arch(const char* arch_file_name) {
|
||||
OpenFPGAArch openfpga_arch;
|
||||
openfpga::Arch read_xml_openfpga_arch(const char* arch_file_name) {
|
||||
openfpga::Arch openfpga_arch;
|
||||
|
||||
pugi::xml_node Next;
|
||||
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
/********************************************************************
|
||||
* Function declaration
|
||||
*******************************************************************/
|
||||
OpenFPGAArch read_xml_openfpga_arch(const char* arch_file_name);
|
||||
openfpga::Arch read_xml_openfpga_arch(const char* arch_file_name);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* A writer to output an OpenFPGAArch to XML format
|
||||
*******************************************************************/
|
||||
void write_xml_openfpga_arch(const char* fname,
|
||||
const OpenFPGAArch& openfpga_arch) {
|
||||
const openfpga::Arch& openfpga_arch) {
|
||||
/* Create a file handler */
|
||||
std::fstream fp;
|
||||
/* Open the file stream */
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
* Function declaration
|
||||
*******************************************************************/
|
||||
void write_xml_openfpga_arch(const char* xml_fname,
|
||||
const OpenFPGAArch& openfpga_arch);
|
||||
const openfpga::Arch& openfpga_arch);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,7 +16,7 @@ int main(int argc, const char** argv) {
|
|||
VTR_ASSERT((2 == argc) || (3 == argc));
|
||||
|
||||
/* Parse the circuit library from an XML file */
|
||||
const OpenFPGAArch& openfpga_arch = read_xml_openfpga_arch(argv[1]);
|
||||
const openfpga::Arch& openfpga_arch = read_xml_openfpga_arch(argv[1]);
|
||||
VTR_LOG("Parsed %lu circuit models from XML into circuit library.\n",
|
||||
openfpga_arch.circuit_lib.num_models());
|
||||
|
||||
|
|
Loading…
Reference in New Issue