diff options
Diffstat (limited to 'ice40/main.cc')
-rw-r--r-- | ice40/main.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ice40/main.cc b/ice40/main.cc index de618cbf..83cb04b0 100644 --- a/ice40/main.cc +++ b/ice40/main.cc @@ -36,7 +36,7 @@ class Ice40CommandHandler : public CommandHandler public: Ice40CommandHandler(int argc, char **argv); virtual ~Ice40CommandHandler(){}; - std::unique_ptr<Context> createContext(std::unordered_map<std::string,Property> &values) override; + std::unique_ptr<Context> createContext(std::unordered_map<std::string, Property> &values) override; void setupArchContext(Context *ctx) override; void validate() override; void customAfterLoad(Context *ctx) override; @@ -116,7 +116,7 @@ void Ice40CommandHandler::setupArchContext(Context *ctx) } } -std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<std::string,Property> &values) +std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<std::string, Property> &values) { ArchArgs chipArgs; chipArgs.type = ArchArgs::NONE; @@ -158,12 +158,12 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s if (vm.count("package")) chipArgs.package = vm["package"].as<std::string>(); - if (values.find("arch.name")!=values.end()) { + if (values.find("arch.name") != values.end()) { std::string arch_name = values["arch.name"].str; if (arch_name != "ice40") log_error("Unsuported architecture '%s'.\n", arch_name.c_str()); } - if (values.find("arch.type")!=values.end()) { + if (values.find("arch.type") != values.end()) { std::string arch_type = values["arch.type"].str; if (chipArgs.type != ArchArgs::NONE) log_error("Overriding architecture is unsuported.\n"); @@ -190,14 +190,14 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s chipArgs.type = ArchArgs::U4K; } if (chipArgs.type == ArchArgs::NONE) - log_error("Unsuported FPGA type '%s'.\n",arch_type.c_str()); + log_error("Unsuported FPGA type '%s'.\n", arch_type.c_str()); } - if (values.find("arch.package")!=values.end()) { + if (values.find("arch.package") != values.end()) { if (vm.count("package")) log_error("Overriding architecture is unsuported.\n"); chipArgs.package = values["arch.package"].str; } - + if (chipArgs.type == ArchArgs::NONE) { chipArgs.type = ArchArgs::HX1K; chipArgs.package = "tq144"; @@ -209,7 +209,7 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s #endif auto ctx = std::unique_ptr<Context>(new Context(chipArgs)); - for(auto &val : values) + for (auto &val : values) ctx->settings[ctx->id(val.first)] = val.second; ctx->settings[ctx->id("arch.package")] = ctx->archArgs().package; |