diff options
| author | David Shah <dave@ds0.me> | 2019-11-15 17:59:42 +0000 | 
|---|---|---|
| committer | David Shah <dave@ds0.me> | 2019-12-27 10:44:30 +0000 | 
| commit | 9e6770af9086326b3d7c0cb29e8b144fb3578369 (patch) | |
| tree | 2cf4e5b276b6da9a0cc841250c0bebedd73b822a | |
| parent | eb14cf09f4d2c81a3f01f33394b78ec29df44035 (diff) | |
| download | nextpnr-9e6770af9086326b3d7c0cb29e8b144fb3578369.tar.gz nextpnr-9e6770af9086326b3d7c0cb29e8b144fb3578369.tar.bz2 nextpnr-9e6770af9086326b3d7c0cb29e8b144fb3578369.zip  | |
command: Use new frontend experimentally
Signed-off-by: David Shah <dave@ds0.me>
| -rw-r--r-- | common/command.cc | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/common/command.cc b/common/command.cc index 13cd3498..c75f91ef 100644 --- a/common/command.cc +++ b/common/command.cc @@ -35,7 +35,7 @@  #include <iostream>  #include "command.h"  #include "design_utils.h" -#include "frontend_base.h" +#include "json_frontend.h"  #include "jsonparse.h"  #include "jsonwrite.h"  #include "log.h" @@ -266,9 +266,13 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)              if (vm.count("json")) {                  std::string filename = vm["json"].as<std::string>();                  std::ifstream f(filename); +#ifdef LEGACY_FRONTEND                  if (!parse_json_file(f, filename, w.getContext()))                      log_error("Loading design failed.\n"); - +#else +                if (!parse_json(f, filename, w.getContext())) +                    log_error("Loading design failed.\n"); +#endif                  customAfterLoad(w.getContext());                  w.notifyChangeContext();                  w.updateActions(); @@ -285,8 +289,13 @@ int CommandHandler::executeMain(std::unique_ptr<Context> ctx)      if (vm.count("json")) {          std::string filename = vm["json"].as<std::string>();          std::ifstream f(filename); +#ifdef LEGACY_FRONTEND          if (!parse_json_file(f, filename, ctx.get()))              log_error("Loading design failed.\n"); +#else +        if (!parse_json(f, filename, ctx.get())) +            log_error("Loading design failed.\n"); +#endif          customAfterLoad(ctx.get());      }  | 
