router2: Deal with some special cases

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2019-11-15 11:38:11 +00:00
parent fa217a50a5
commit 385380401a

View File

@ -572,7 +572,17 @@ struct Router2
auto &ad = nd.arcs.at(usr_idx); auto &ad = nd.arcs.at(usr_idx);
auto &usr = net->users.at(usr_idx); auto &usr = net->users.at(usr_idx);
WireId src = ctx->getNetinfoSourceWire(net); WireId src = ctx->getNetinfoSourceWire(net);
// Skip routes with no source
if (src == WireId())
return true;
WireId dst = ctx->getNetinfoSinkWire(net, usr); WireId dst = ctx->getNetinfoSinkWire(net, usr);
// Skip routes where the destination is already bound
if (dst == WireId() || ctx->getBoundWireNet(dst) == net)
return true;
// Skip routes where there is no routing (special cases)
if (ad.wires.empty())
return true;
WireId cursor = dst; WireId cursor = dst;
std::vector<PipId> to_bind; std::vector<PipId> to_bind;