diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-21 17:56:45 +0200 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2018-06-21 17:56:45 +0200 |
commit | 8fac26c2b795865098b1ba16152cd1c510133f29 (patch) | |
tree | 1b0d9a48c1198fc8cfd5f2ef6253104e93c54048 /gui/ice40/worker.cc | |
parent | 54549d36e911aac8d0b0a2eea6074654c06c9717 (diff) | |
download | nextpnr-8fac26c2b795865098b1ba16152cd1c510133f29.tar.gz nextpnr-8fac26c2b795865098b1ba16152cd1c510133f29.tar.bz2 nextpnr-8fac26c2b795865098b1ba16152cd1c510133f29.zip |
Fixed return codes for packer, placer and router
Diffstat (limited to 'gui/ice40/worker.cc')
-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) |