From a69c595802bb20517ced3a2a82a6dde4b8dc6a03 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 12 Nov 2020 11:08:13 +0000 Subject: router1: Fix same-source-dest case Signed-off-by: David Shah --- common/router1.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'common/router1.cc') diff --git a/common/router1.cc b/common/router1.cc index 946327d2..d2816c1e 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -469,6 +469,20 @@ struct Router1 } } + // special case + + if (src_wire == dst_wire) { + NetInfo *bound = ctx->getBoundWireNet(src_wire); + if (bound != nullptr) + NPNR_ASSERT(bound == net_info); + else { + ctx->bindWire(src_wire, net_info, STRENGTH_WEAK); + } + arc_to_wires[arc].insert(src_wire); + wire_to_arcs[src_wire].insert(arc); + return true; + } + // reset wire queue if (!queue.empty()) { -- cgit v1.2.3