router2: debugging

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-12-03 14:07:24 +00:00
parent 3d739b5916
commit 17256c680a

View File

@ -356,8 +356,11 @@ struct Router2
std::unordered_set<WireId> rsv; std::unordered_set<WireId> rsv;
WireId cursor = sink; WireId cursor = sink;
bool done = false; bool done = false;
log("resevering wires for arc %d of net %s\n", int(i), ctx->nameOf(net));
while (!done) { while (!done) {
auto &wd = wires.at(cursor); auto &wd = wires.at(cursor);
if (ctx->debug)
log(" %s\n", ctx->nameOfWire(cursor));
wd.reserved_net = net->udata; wd.reserved_net = net->udata;
if (cursor == src) if (cursor == src)
break; break;
@ -648,7 +651,9 @@ struct Router2
auto res2 = route_arc(t, net, i, is_mt, false); auto res2 = route_arc(t, net, i, is_mt, false);
// If this also fails, no choice but to give up // If this also fails, no choice but to give up
if (res2 != ARC_SUCCESS) if (res2 != ARC_SUCCESS)
log_error("Failed to route arc %d of net '%s'.\n", int(i), ctx->nameOf(net)); log_error("Failed to route arc %d of net '%s', from %s to %s.\n", int(i), ctx->nameOf(net),
ctx->nameOfWire(ctx->getNetinfoSourceWire(net)),
ctx->nameOfWire(ctx->getNetinfoSinkWire(net, net->users.at(i))));
} }
} }
} }