diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2021-06-30 10:10:18 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2021-06-30 10:10:18 +0200 |
commit | 5c6b8a5f0473c6ec04dd045029eb0d87353558ab (patch) | |
tree | 7c530e15b870d48ba465710ded34604320a9f956 /common | |
parent | 6c23fe202c5aceac0079ff3211298e7d2ec88a7e (diff) | |
download | nextpnr-5c6b8a5f0473c6ec04dd045029eb0d87353558ab.tar.gz nextpnr-5c6b8a5f0473c6ec04dd045029eb0d87353558ab.tar.bz2 nextpnr-5c6b8a5f0473c6ec04dd045029eb0d87353558ab.zip |
Preserve ArchArgs and reinit Context when applicable in GUI
Diffstat (limited to 'common')
-rw-r--r-- | common/command.cc | 9 | ||||
-rw-r--r-- | common/context.h | 6 |
2 files changed, 5 insertions, 10 deletions
diff --git a/common/command.cc b/common/command.cc index 89bbf90c..7f276193 100644 --- a/common/command.cc +++ b/common/command.cc @@ -475,15 +475,6 @@ int CommandHandler::exec() void CommandHandler::load_json(Context *ctx, std::string filename) { - ctx->cells.clear(); - ctx->nets.clear(); - ctx->net_aliases.clear(); - ctx->ports.clear(); - ctx->hierarchy.clear(); - ctx->settings.erase(ctx->id("pack")); - ctx->settings.erase(ctx->id("place")); - ctx->settings.erase(ctx->id("route")); - setupContext(ctx); setupArchContext(ctx); { diff --git a/common/context.h b/common/context.h index ee7ef0ce..f2b66600 100644 --- a/common/context.h +++ b/common/context.h @@ -37,7 +37,11 @@ struct Context : Arch, DeterministicRNG // Should we disable printing of the location of nets in the critical path? bool disable_critical_path_source_print = false; - Context(ArchArgs args) : Arch(args) { BaseCtx::as_ctx = this; } + ArchArgs arch_args; + + Context(ArchArgs args) : Arch(args) { BaseCtx::as_ctx = this; arch_args = args; } + + ArchArgs getArchArgs() { return arch_args; } // -------------------------------------------------------------- |