diff options
author | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-27 05:54:18 +0000 |
---|---|---|
committer | Eddie Hung <eddie.hung+gitlab@gmail.com> | 2018-07-27 05:54:18 +0000 |
commit | 56d551d4071194b0484395cdd1418cdacd56679f (patch) | |
tree | 2dea519e47cf4181cc9d18cab3b2ae821a963da1 /common/router1.cc | |
parent | 771edd1fda8692930e186a8913b7588d18fda710 (diff) | |
parent | 4c40541484f0f0b571e1c7e4604c39c74dd5c93d (diff) | |
download | nextpnr-56d551d4071194b0484395cdd1418cdacd56679f.tar.gz nextpnr-56d551d4071194b0484395cdd1418cdacd56679f.tar.bz2 nextpnr-56d551d4071194b0484395cdd1418cdacd56679f.zip |
Merge branch 'redist_slack' into 'redist_slack'
Redist slack
See merge request eddiehung/nextpnr!10
Diffstat (limited to 'common/router1.cc')
-rw-r--r-- | common/router1.cc | 41 |
1 files changed, 7 insertions, 34 deletions
diff --git a/common/router1.cc b/common/router1.cc index 431770da..2ae54245 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -613,38 +613,10 @@ bool router1(Context *ctx) std::unordered_set<IdString> normalRouteNets, ripupQueue; - if (iterCnt == 1) { - if (ctx->verbose) - log_info("routing queue contains %d jobs.\n", int(jobQueue.size())); - } else { - static auto actual_delay = [](Context *ctx, WireId src, WireId dst) { - delay_t total_delay = 0; - WireId last = dst; - auto net_name = ctx->getBoundWireNet(src); - if (net_name != IdString()) { - auto net = ctx->nets.at(net_name).get(); - while (last != src) { - total_delay += ctx->getWireDelay(last).maxDelay(); - auto pip = net->wires.at(last).pip; - NPNR_ASSERT(ctx->getBoundPipNet(pip) == net_name); - total_delay += ctx->getPipDelay(pip).maxDelay(); - last = ctx->getPipSrcWire(pip); - if (ctx->getBoundWireNet(last) != net_name) { - log_warning("Wire %s bound to %s not %s!\n", ctx->getWireName(last).c_str(ctx), ctx->getBoundWireNet(last).c_str(ctx), net_name.c_str(ctx)); - break; - } - NPNR_ASSERT(ctx->getBoundWireNet(last) == net_name); - } - NPNR_ASSERT(last != WireId()); - } - if (last != src) - total_delay += ctx->estimateDelay(src, last); - else - total_delay += ctx->getWireDelay(last).maxDelay(); - return total_delay; - }; - update_budget(ctx, actual_delay); - } + if (ctx->verbose || iterCnt == 1) + log_info("routing queue contains %d jobs.\n", int(jobQueue.size())); + + update_budget(ctx); bool printNets = ctx->verbose && (jobQueue.size() < 10); @@ -841,14 +813,15 @@ bool router1(Context *ctx) log_info("Checksum: 0x%08x\n", ctx->checksum()); #ifndef NDEBUG ctx->check(); - ctx->unlock(); #endif + compute_fmax(ctx, true /* print_fmax */, true /* print_path */); + ctx->unlock(); return true; } catch (log_execution_error_exception) { #ifndef NDEBUG ctx->check(); - ctx->unlock(); #endif + ctx->unlock(); return false; } } |