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 /common/command.h | |
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 'common/command.h')
-rw-r--r-- | common/command.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/common/command.h b/common/command.h index d0f1d328..e52b5a48 100644 --- a/common/command.h +++ b/common/command.h @@ -22,9 +22,9 @@ #define COMMAND_H #include <boost/program_options.hpp> +#include <fstream> +#include "log.h" #include "nextpnr.h" -#include "project.h" -#include "settings.h" NEXTPNR_NAMESPACE_BEGIN @@ -37,10 +37,11 @@ class CommandHandler virtual ~CommandHandler(){}; int exec(); + std::unique_ptr<Context> load_json(std::string filename); protected: virtual void setupArchContext(Context *ctx) = 0; - virtual std::unique_ptr<Context> createContext() = 0; + virtual std::unique_ptr<Context> createContext(std::unordered_map<std::string, Property> &values) = 0; virtual po::options_description getArchOptions() = 0; virtual void validate(){}; virtual void customAfterLoad(Context *ctx){}; @@ -58,15 +59,12 @@ class CommandHandler protected: po::variables_map vm; - ArchArgs chipArgs; - std::unique_ptr<Settings> settings; private: po::options_description options; po::positional_options_description pos; int argc; char **argv; - ProjectHandler project; std::ofstream logfile; }; |