diff options
author | David Shah <dave@ds0.me> | 2019-07-03 12:39:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 12:39:38 +0100 |
commit | 8f2813279c5888e655ee6f50f198cf8cb11b0b50 (patch) | |
tree | 0aac9464d3ea87d37cd0689903ba08094b7c0984 /generic/main.cc | |
parent | ff958830d1097b9bfa3c3b34094e671741ef563d (diff) | |
parent | e27dc41a7646fd3377d2400059c916fbcc35119c (diff) | |
download | nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.tar.gz nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.tar.bz2 nextpnr-8f2813279c5888e655ee6f50f198cf8cb11b0b50.zip |
Merge pull request #284 from YosysHQ/json_write
Initial support for writing to json files from nextpnr.
Diffstat (limited to 'generic/main.cc')
-rw-r--r-- | generic/main.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/main.cc b/generic/main.cc index c203f35c..ce1a51c7 100644 --- a/generic/main.cc +++ b/generic/main.cc @@ -32,7 +32,7 @@ class GenericCommandHandler : public CommandHandler public: GenericCommandHandler(int argc, char **argv); virtual ~GenericCommandHandler(){}; - std::unique_ptr<Context> createContext() override; + std::unique_ptr<Context> createContext(std::unordered_map<std::string, Property> &values) override; void setupArchContext(Context *ctx) override{}; void customBitstream(Context *ctx) override; @@ -51,8 +51,14 @@ po::options_description GenericCommandHandler::getArchOptions() void GenericCommandHandler::customBitstream(Context *ctx) {} -std::unique_ptr<Context> GenericCommandHandler::createContext() +std::unique_ptr<Context> GenericCommandHandler::createContext(std::unordered_map<std::string, Property> &values) { + ArchArgs chipArgs; + if (values.find("arch.name") != values.end()) { + std::string arch_name = values["arch.name"].str; + if (arch_name != "generic") + log_error("Unsuported architecture '%s'.\n", arch_name.c_str()); + } return std::unique_ptr<Context>(new Context(chipArgs)); } |