add profiling for read arch
This commit is contained in:
parent
cdb3b6de46
commit
a03f8aa346
|
@ -6,10 +6,10 @@
|
||||||
* 3. if nay circuit model miss mandatory ports
|
* 3. if nay circuit model miss mandatory ports
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
/* Header files should be included in a sequence */
|
/* Headers from vtrutil library */
|
||||||
/* Standard header files required go first */
|
|
||||||
#include "vtr_assert.h"
|
#include "vtr_assert.h"
|
||||||
#include "vtr_log.h"
|
#include "vtr_log.h"
|
||||||
|
#include "vtr_time.h"
|
||||||
|
|
||||||
#include "check_circuit_library.h"
|
#include "check_circuit_library.h"
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ size_t check_circuit_library_ports(const CircuitLibrary& circuit_lib) {
|
||||||
void check_circuit_library(const CircuitLibrary& circuit_lib) {
|
void check_circuit_library(const CircuitLibrary& circuit_lib) {
|
||||||
size_t num_err = 0;
|
size_t num_err = 0;
|
||||||
|
|
||||||
VTR_LOG("Checking circuit models...\n");
|
vtr::ScopedStartFinishTimer timer("Check circuit library");
|
||||||
|
|
||||||
/* 1. Circuit models have unique names
|
/* 1. Circuit models have unique names
|
||||||
* For each circuit model, we always make sure it does not share any name with any circuit model locating after it
|
* For each circuit model, we always make sure it does not share any name with any circuit model locating after it
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
#include "pugixml.hpp"
|
#include "pugixml.hpp"
|
||||||
#include "pugixml_util.hpp"
|
#include "pugixml_util.hpp"
|
||||||
|
|
||||||
|
/* Headers from vtrutil library */
|
||||||
|
#include "vtr_time.h"
|
||||||
|
|
||||||
/* Headers from libarchfpga */
|
/* Headers from libarchfpga */
|
||||||
#include "arch_error.h"
|
#include "arch_error.h"
|
||||||
#include "read_xml_util.h"
|
#include "read_xml_util.h"
|
||||||
|
@ -26,6 +29,8 @@
|
||||||
* 1. circuit library
|
* 1. circuit library
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
openfpga::Arch read_xml_openfpga_arch(const char* arch_file_name) {
|
openfpga::Arch read_xml_openfpga_arch(const char* arch_file_name) {
|
||||||
|
vtr::ScopedStartFinishTimer timer("Read OpenFPGA architecture");
|
||||||
|
|
||||||
openfpga::Arch openfpga_arch;
|
openfpga::Arch openfpga_arch;
|
||||||
|
|
||||||
pugi::xml_node Next;
|
pugi::xml_node Next;
|
||||||
|
|
|
@ -32,7 +32,7 @@ void read_arch(OpenfpgaContext& openfpga_context,
|
||||||
VTR_ASSERT(false == cmd_context.option_value(cmd, opt_file).empty());
|
VTR_ASSERT(false == cmd_context.option_value(cmd, opt_file).empty());
|
||||||
|
|
||||||
std::string arch_file_name = cmd_context.option_value(cmd, opt_file);
|
std::string arch_file_name = cmd_context.option_value(cmd, opt_file);
|
||||||
|
|
||||||
VTR_LOG("Reading XML architecture '%s'...\n",
|
VTR_LOG("Reading XML architecture '%s'...\n",
|
||||||
arch_file_name.c_str());
|
arch_file_name.c_str());
|
||||||
openfpga_context.mutable_arch() = read_xml_openfpga_arch(arch_file_name.c_str());
|
openfpga_context.mutable_arch() = read_xml_openfpga_arch(arch_file_name.c_str());
|
||||||
|
|
Loading…
Reference in New Issue