diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-08-08 18:17:34 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-08-08 18:17:34 +0200 |
commit | fc5cee6fb896bc4d7a8b79dcde789e03c787bd89 (patch) | |
tree | ea6a0c6531aed19796cfa6ab50a24fb1408ad72f /common | |
parent | ecc21caa77b09075a97d131890019f6b97281928 (diff) | |
download | nextpnr-fc5cee6fb896bc4d7a8b79dcde789e03c787bd89.tar.gz nextpnr-fc5cee6fb896bc4d7a8b79dcde789e03c787bd89.tar.bz2 nextpnr-fc5cee6fb896bc4d7a8b79dcde789e03c787bd89.zip |
clangformat
Diffstat (limited to 'common')
-rw-r--r-- | common/command.cc | 4 | ||||
-rw-r--r-- | common/project.cc | 13 |
2 files changed, 8 insertions, 9 deletions
diff --git a/common/command.cc b/common/command.cc index 9c2cc840..cf12df3a 100644 --- a/common/command.cc +++ b/common/command.cc @@ -35,8 +35,8 @@ #include "design_utils.h" #include "jsonparse.h" #include "log.h" +#include "timing.h" #include "version.h" -#include <timing.h> NEXTPNR_NAMESPACE_BEGIN @@ -244,7 +244,7 @@ int CommandHandler::exec() if (executeBeforeContext()) return 0; - + std::unique_ptr<Context> ctx; if (vm.count("load")) { ctx = project.load(vm["load"].as<std::string>()); diff --git a/common/project.cc b/common/project.cc index 8e043f36..244ca761 100644 --- a/common/project.cc +++ b/common/project.cc @@ -17,12 +17,12 @@ * */ +#include "project.h" #include <boost/filesystem/convenience.hpp> #include <boost/property_tree/json_parser.hpp> -#include "project.h" -#include "log.h" -#include "jsonparse.h" #include <fstream> +#include "jsonparse.h" +#include "log.h" NEXTPNR_NAMESPACE_BEGIN @@ -34,10 +34,10 @@ void ProjectHandler::save(Context *ctx, std::string filename) root.put("project.name", boost::filesystem::basename(filename)); root.put("project.arch.name", ctx->archId().c_str(ctx)); root.put("project.arch.type", ctx->archArgsToId(ctx->archArgs()).c_str(ctx)); -/* root.put("project.input.json", );*/ + /* root.put("project.input.json", );*/ root.put("project.params.freq", int(ctx->target_freq / 1e6)); root.put("project.params.seed", ctx->rngstate); - saveArch(ctx,root); + saveArch(ctx, root); pt::write_json(f, root); } @@ -55,7 +55,6 @@ std::unique_ptr<Context> ProjectHandler::load(std::string filename) if (version != 1) log_error("Wrong project format version.\n"); - ctx = createContext(root); std::string arch_name = root.get<std::string>("project.arch.name"); @@ -77,7 +76,7 @@ std::unique_ptr<Context> ProjectHandler::load(std::string filename) if (params.count("seed")) ctx->rngseed(params.get<uint64_t>("seed")); } - loadArch(ctx.get(),root, proj.parent_path().string()); + loadArch(ctx.get(), root, proj.parent_path().string()); } catch (...) { log_error("Error loading project file.\n"); } |