diff options
Diffstat (limited to 'gui/ice40')
-rw-r--r-- | gui/ice40/worker.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/gui/ice40/worker.cc b/gui/ice40/worker.cc index 92a0f6ac..f86ec55e 100644 --- a/gui/ice40/worker.cc +++ b/gui/ice40/worker.cc @@ -19,20 +19,22 @@ void Worker::parsejson(const std::string &filename) { std::string fn = filename; std::ifstream f(fn); + try { + parse_json_file(f, fn, ctx); + if (!pack_design(ctx)) + log_error("Packing design failed.\n"); + double freq = 50e6; + assign_budget(ctx, freq); + print_utilisation(ctx); - parse_json_file(f, fn, ctx); - if (!pack_design(ctx)) - log_error("Packing design failed.\n"); - double freq = 50e6; - assign_budget(ctx, freq); - print_utilisation(ctx); - - if (!place_design_sa(ctx)) - log_error("Placing design failed.\n"); - if (!route_design(ctx)) - log_error("Routing design failed.\n"); - print_utilisation(ctx); - Q_EMIT log("done"); + if (!place_design_sa(ctx)) + log_error("Placing design failed.\n"); + if (!route_design(ctx)) + log_error("Routing design failed.\n"); + Q_EMIT log("done"); + } catch (log_execution_error_exception) { + Q_EMIT log("failed"); + } } TaskManager::TaskManager(Context *ctx) |