diff options
author | gatecat <gatecat@ds0.me> | 2021-07-06 11:43:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-06 11:43:24 +0100 |
commit | c0bb2fb76a700a1ff3b9aaa663cfd70194df2a3a (patch) | |
tree | 11d7496a94275f54e98d566958890285e18a3104 /common | |
parent | 8a9fb810369aeb5eed128ef4e7d4de456ef1ec8f (diff) | |
parent | 31abefc8e49edce55fb42c99ac99b81e948d9004 (diff) | |
download | nextpnr-c0bb2fb76a700a1ff3b9aaa663cfd70194df2a3a.tar.gz nextpnr-c0bb2fb76a700a1ff3b9aaa663cfd70194df2a3a.tar.bz2 nextpnr-c0bb2fb76a700a1ff3b9aaa663cfd70194df2a3a.zip |
Merge pull request #750 from YosysHQ/gatecat/io-improve
IO improvements for OBUFTDS
Diffstat (limited to 'common')
-rw-r--r-- | common/router2.cc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/common/router2.cc b/common/router2.cc index a8eea5f9..7bffc089 100644 --- a/common/router2.cc +++ b/common/router2.cc @@ -856,10 +856,20 @@ struct Router2 int(a.first), int(a.second), ctx->nameOf(net)); auto res2 = route_arc(t, net, a.first, a.second, is_mt, false); // If this also fails, no choice but to give up - if (res2 != ARC_SUCCESS) + if (res2 != ARC_SUCCESS) { + if (ctx->debug) { + log_info("Pre-bound routing: \n"); + for (auto &wire_pair : net->wires) { + log(" %s", ctx->nameOfWire(wire_pair.first)); + if (wire_pair.second.pip != PipId()) + log(" %s", ctx->nameOfPip(wire_pair.second.pip)); + log("\n"); + } + } log_error("Failed to route arc %d.%d of net '%s', from %s to %s.\n", int(a.first), int(a.second), ctx->nameOf(net), ctx->nameOfWire(ctx->getNetinfoSourceWire(net)), ctx->nameOfWire(ctx->getNetinfoSinkWire(net, net->users.at(a.first), a.second))); + } } } } @@ -968,17 +978,17 @@ struct Router2 log_error("Internal error; incomplete route tree for arc %d of net %s.\n", usr_idx, ctx->nameOf(net)); } auto &p = wd.bound_nets.at(net->udata).second; - if (!ctx->checkPipAvail(p)) { + if (ctx->checkPipAvailForNet(p, net)) { NetInfo *bound_net = ctx->getBoundPipNet(p); - if (bound_net != net) { - if (ctx->verbose) { - log_info("Failed to bind pip %s to net %s\n", ctx->nameOfPip(p), net->name.c_str(ctx)); - } - success = false; - break; + if (bound_net == nullptr) { + to_bind.push_back(p); } } else { - to_bind.push_back(p); + if (ctx->verbose) { + log_info("Failed to bind pip %s to net %s\n", ctx->nameOfPip(p), net->name.c_str(ctx)); + } + success = false; + break; } cursor = ctx->getPipSrcWire(p); } |